Having Problems Plotting Graphs On PV-WAVE [message #1122] |
Tue, 03 August 1993 12:20 |
anadeem
Messages: 3 Registered: January 1993
|
Junior Member |
|
|
Fellow Netters,
.......I am trying to develop a .pro file for use to plot out graphs using
PV-WAVE. I am trying to plot the values in data files called spline.dat and
derivati.dat versus the values in the data file x.dat.
Below is a sample .pro I am working on. For some reason, I can
plot the values of spline versus x but not derivati versus x on the same plot. As you can see, I have expanded the range of values of the axes when I use the
plot command. Upon using the oplot command, I just get a straight line passing
through the first value of derivati.dat ( I mean horizontal straight line )
which should not be the case as the values vary considerably.
************************************************************ *******************
x = fltarr(2000)
openr, 1, 'x.dat' ; OPEN A FILE TO BE READ INTO X ARRAY
i = 0
while not eof(1) do begin
readf, 1, temp1
x(i) = temp1
i = i+1
endwhile
close, 1 ; CLOSE UNIT FILE
print, i
spline = fltarr(2000)
openr, 1, 'spline.dat' ;OPEN SPLINE.DAT WITH SPLINE VALUES
i = 0
while not eof(1) do begin
readf, 1, temp1
spline(i) = temp1
i = i +1
endwhile
close, 1 ; CLOSE UNIT FILE
print, i
derivati = fltarr(2000)
openr, 1, 'derivati.dat' ; OPEN FILE WITH DERIVATIVE VALUES
i = 0
while not eof(1) do begin
readf, 1, temp1
derivati(i) = temp1
i = i +1
endwhile
close, 1 ; CLOSE UNIT FILE
print, i
plot, x, derivati, title='Graph Of Spline And Derivatives',XRange=[0,4],$
YRange = [-70,+70]
oplot, spline, linestyle =2
End
************************************************************ *******************
What am I doing wrong? I really need to get this done badly. Any help
would be highly appreciated.
Thank You,
Ahmed Nadeem
|
|
|