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

Home » Public Forums » archive » How do you using the IDL to add a straight line of 45 degrees inclination to scatter plot of the square?
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
How do you using the IDL to add a straight line of 45 degrees inclination to scatter plot of the square? [message #92033] Fri, 02 October 2015 00:06 Go to next message
ristight is currently offline  ristight
Messages: 5
Registered: September 2015
Junior Member
I want to add a line of 45 degrees inclination to scatter diagram using the IDL.
How do you rewrite this program?
Someone help me please.

;Program

pro sactter_plot

x1 = fltarr(3600,1200)
y1 = fltarr(3600,1200)
mvk = fltarr(3600,1200)
nrt = fltarr(3600,1200)


fname1='C:\Users\Desktop\mvk_20150331.txt'
fname2='C:\Users\Desktop\nrt_20150331.txt'
openr,1,fname1
openr,2,fname2
readf,1,x1
readf,2,y1


p=plot(x1,y1,aspect_ratio=1,xrange=[0,2000],yrange=[0,2000], linestyle='none',symbol='star',color='000000'XL,title='20150 331 precipitation',xtitle='mvk precipitation [mm]',ytitle='nrt precipitation [mm]')
close, /all


end
Re: How do you using the IDL to add a straight line of 45 degrees inclination to scatter plot of the square? [message #92038 is a reply to message #92033] Fri, 02 October 2015 06:31 Go to previous message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
On Friday, October 2, 2015 at 2:06:46 AM UTC-5, 山本正志 wrote:
> I want to add a line of 45 degrees inclination to scatter diagram using the IDL.
> How do you rewrite this program?
> Someone help me please.

As yourself this: how do you mathematically define a straight line? Then, what does "45 degrees inclination" mean for the slope of the line?

Once you have that, you just overplot this line on your plot.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Reading netcdf/hdf5 files slows down
Next Topic: OVERPLOT HISTOGRAM

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

Current Time: Wed Oct 08 07:23:46 PDT 2025

Total time taken to generate the page: 0.00581 seconds