CURSOR procedure [message #1125] |
Mon, 02 August 1993 16:27 |
AMAZUK
Messages: 3 Registered: August 1993
|
Junior Member |
|
|
Hello,
I am running IDL Version 3.0.0 using VAX/VMS 5.5. I am trying to make
multiple calls to CURSOR to read in data coordinates. It seems to work
the first time that I call CURSOR, but each call after that gives erroneous
results. Has any else had this problem? Is there some procedure that I
need to use between CURSOR calls?
I have included my test program that I am using as well as the journal
output. Words in < > are my comments. Any insite would greatly be
appreciated. Unfortunately I do not have access to read this newsgroup,
so please send replies directly to me at the below address. I will post
any solutions that I receive for those who have encountered similar problems.
pro short,xdata,ydata
xdata=fltarr(5)
ydata=fltarr(5)
xdata(*)=0.
ydata(*) = 0.
x=findgen(100)-50
y=x^2
plot,x,y
cursor,x1,y1
xdata(0) = x1
ydata(0) = y1
cursor,x1,y1
xdata(1) = x1
ydata(1) = y1
cursor,x1,y1
xdata(2) = x1
ydata(2) = y1
cursor,x1,y1
xdata(3) = x1
ydata(3) = y1
cursor,x1,y1
xdata(4) = x1
ydata(4) = y1
return
end
; IDL Version 3.0.0 (vms vax)
; Date: Mon Aug 2 16:02:40 1993
set_plot,'tek'
.run short
short,xdata,ydata
47$1 < I did not input this - seems to be extraneous, any clues? >
; % Syntax error.
print,xdata,ydata
print,xdata,ydata
; 34.8667 -16.3072 -17.8452 40.3197 -51.1222
; 1214.90 192.219 2487.49 1341.78 1311.02
< should be xdata = [35, 40, 45, 50, 55], ydata=[1225,1600,2025,2500,3025] >
Thanks again,
Ann
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
Ann Mazuk Internet: amazuk@dirac2.span.nasa.gov
The Aerospace Corporation SPAN: DIRAC2::AMAZUK
El Segundo, California
* same ole disclaimer: these views are mine - not my employer's or NASA's
------------------------------------------------------------ ----------------
|
|
|