comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Do you want to make a scatter plot of the square should I do if there?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Do you want to make a scatter plot of the square should I do if there? [message #92008] Wed, 30 September 2015 00:54 Go to next message
ristight is currently offline  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 Go to previous messageGo to next message
Helder Marchetto is currently offline  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 Go to previous messageGo to next message
chris_torrence@NOSPAM is currently offline  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
Re: Do you want to make a scatter plot of the square should I do if there? [message #92032 is a reply to message #92008] Thu, 01 October 2015 23:30 Go to previous message
ristight is currently offline  ristight
Messages: 5
Registered: September 2015
Junior Member
Thank you very much.
Problem it was resolved.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: JOIN POINTS IN A PLOT
Next Topic: Attempt to call undefined procedure: 'DEFAULT' error

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 09:20:47 PDT 2025

Total time taken to generate the page: 0.00571 seconds