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

Home » Public Forums » archive » Problems with using oplot and a for loop
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
Problems with using oplot and a for loop [message #76778] Fri, 01 July 2011 11:30
Alexa is currently offline  Alexa
Messages: 8
Registered: June 2011
Junior Member
Hi All,

I'm am trying to plot a theoretical curve on top of my data. The
theoretical curve is being read into the program correctly but when I
use the oplot command the theoretical curve does not show up on the
plot. I think it has to do with the fact that I'm using a separate for
loop to read in the curve array but I don't know what else I should
do. Here is my code:


;;Open file and put list into an array
ReadCol, "NormTransList.txt",Transition,Lam0, format='a'

;;Read in theoretical curve file
ReadCol, "HITrans.t.txt", TCurve, format='a'

;;Plot radial velocities for each absorption feature
for nt=0, N_ELEMENTS(Transition)-1 do begin
ReadCol, Transition[nt], wavelength, flux, sigma, format='f,f,f'
for nr=0, N_Elements(TCurve)-1 do begin
ReadCol, TCurve[nr], curve, residule, format='f'
;print,curve
endfor
;;Calling the results from the conversion to the procedure
print, Transition[nt], lam0[nt]
Velocity=lam_conversion(Lam0[nt], wavelength, zabs)
oplot, Velocity, sigma,color=fsc_color("cyan")
oplot, Velocity, curve, color=fsc_color("red")
endfor

Any suggestions?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: A problem with the group?
Next Topic: Re: Problems with using oplot and a for loop

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

Current Time: Fri Oct 10 06:31:08 PDT 2025

Total time taken to generate the page: 0.04864 seconds