Do you want to make a scatter plot of the square should I do if there? [message #92008] |
Wed, 30 September 2015 00:54  |
ristight
Messages: 5 Registered: September 2015
|
Junior Member |
|
|
I am making a program using the IDL.
I want to make a scatter plot of the square, but the scatter plot of the rectangle is output.
To make a scatter plot of the square, How do you rewrite this program?
Please tell me someone.
;Program
pro scatter1
x1 = fltarr(3600,1200)
y1 = fltarr(3600,1200)
mvk = fltarr(3600,1200)
nrt = fltarr(3600,1200)
fname1='C:\Users\yamamoto\Desktop\mvk_20140430.txt'
fname2='C:\Users\yamamoto\Desktop\nrt_20140430.txt'
openr,1,fname1
openr,2,fname2
readf,1,x1
readf,2,y1
plot,x1,y1,xrange=[0,2000],yrange=[0,2000],color='000000'XL, background='FFFFFF'XL,psym=2,title='20140430 precipitation',xtitle='mvk precipitation [mm]',ytitle='nrt precipitation [mm]'
close, /all
end
|
|
|
Re: Do you want to make a scatter plot of the square should I do if there? [message #92009 is a reply to message #92008] |
Wed, 30 September 2015 01:03   |
Helder Marchetto
Messages: 520 Registered: November 2011
|
Senior Member |
|
|
On Wednesday, September 30, 2015 at 9:54:18 AM UTC+2, 山本正志 wrote:
> I am making a program using the IDL.
> I want to make a scatter plot of the square, but the scatter plot of the rectangle is output.
> To make a scatter plot of the square, How do you rewrite this program?
> Please tell me someone.
>
> ;Program
> pro scatter1
>
> x1 = fltarr(3600,1200)
> y1 = fltarr(3600,1200)
> mvk = fltarr(3600,1200)
> nrt = fltarr(3600,1200)
>
> fname1='C:\Users\yamamoto\Desktop\mvk_20140430.txt'
> fname2='C:\Users\yamamoto\Desktop\nrt_20140430.txt'
> openr,1,fname1
> openr,2,fname2
> readf,1,x1
> readf,2,y1
>
> plot,x1,y1,xrange=[0,2000],yrange=[0,2000],color='000000'XL, background='FFFFFF'XL,psym=2,title='20140430 precipitation',xtitle='mvk precipitation [mm]',ytitle='nrt precipitation [mm]'
>
> close, /all
> end
I'm not sure I understand your question, but does adding the keyword /ISOTROPIC to your plot command solve your problem?
plot,x1,y1,xrange=[0,2000],yrange=[0,2000],color='000000'XL, background='FFFFFF'XL,psym=2,title='20140430 precipitation',xtitle='mvk precipitation [mm]',ytitle='nrt precipitation [mm]', /ISOTROPIC
Cheers,
Helder
|
|
|
Re: Do you want to make a scatter plot of the square should I do if there? [message #92012 is a reply to message #92009] |
Wed, 30 September 2015 07:45   |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Wednesday, September 30, 2015 at 2:03:43 AM UTC-6, Helder wrote:
> On Wednesday, September 30, 2015 at 9:54:18 AM UTC+2, 山本正志 wrote:
>> I am making a program using the IDL.
>> I want to make a scatter plot of the square, but the scatter plot of the rectangle is output.
>> To make a scatter plot of the square, How do you rewrite this program?
>> Please tell me someone.
>>
>> ;Program
>> pro scatter1
>>
>> x1 = fltarr(3600,1200)
>> y1 = fltarr(3600,1200)
>> mvk = fltarr(3600,1200)
>> nrt = fltarr(3600,1200)
>>
>> fname1='C:\Users\yamamoto\Desktop\mvk_20140430.txt'
>> fname2='C:\Users\yamamoto\Desktop\nrt_20140430.txt'
>> openr,1,fname1
>> openr,2,fname2
>> readf,1,x1
>> readf,2,y1
>>
>> plot,x1,y1,xrange=[0,2000],yrange=[0,2000],color='000000'XL, background='FFFFFF'XL,psym=2,title='20140430 precipitation',xtitle='mvk precipitation [mm]',ytitle='nrt precipitation [mm]'
>>
>> close, /all
>> end
>
> I'm not sure I understand your question, but does adding the keyword /ISOTROPIC to your plot command solve your problem?
>
> plot,x1,y1,xrange=[0,2000],yrange=[0,2000],color='000000'XL, background='FFFFFF'XL,psym=2,title='20140430 precipitation',xtitle='mvk precipitation [mm]',ytitle='nrt precipitation [mm]', /ISOTROPIC
>
> Cheers,
> Helder
Or, in function graphics you can use the aspect_ratio keyword:
x1 = 2000*findgen(100)/100
y1 = 2000*randomu(seed,100)
p = plot(x1,y1,aspect_ratio=1, $
xrange=[0,2000],yrange=[0,2000],symbol='star',$
title='20140430 precipitation',$
xtitle='mvk precipitation [mm]',ytitle='nrt precipitation [mm]')
Cheers,
Chris
|
|
|
|