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

Home » Public Forums » archive » Problems using CURSOR
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Problems using CURSOR [message #5501] Wed, 17 January 1996 00:00 Go to previous message
hahn is currently offline  hahn
Messages: 108
Registered: November 1993
Senior Member
Hi,

My IDL program generates output on a terminal (either X Windows System
or MS Windows) and wants to return 4 coordinate pairs the users
selects. However, the following program waits only once for input and
returns 4 time the same coordinates. The problem occurs with both IDL
version 3.6.1b and 4.0.1 on both Unix and MS Windows, so I guess I
might have overlooked some basic fundamentals using CURSOR.

The following procedure is called after Set_plot, 'x':

pro rd4
;
xr=[0,300] & yr=[-4000,4000]
;
; Some test data
dat = [100,200,-50,-300,-1200,-3000,-2000,0,500,800,3000,2400]
x = IndGen(12)*28

Plot, x, dat, xrange=xr, yrange=yr
;
;Position the cursor at the center of the drawing area
;
tvcrs, 150, 0, /data

Print, 'Enter 4 coordinates by clicking the left mouse key'

xin = FltArr(4) & yin = xin

for i=0,3 do begin
cursor, isx, isy, wait=3
xin(i) = isx
yin(i) = isy
print, isx, isy
endfor
end

What is wrong ?

Norbert Hahn
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: writing to 2 "windows" in idl?
Next Topic: Specifying a line feed

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

Current Time: Fri Oct 10 21:11:10 PDT 2025

Total time taken to generate the page: 0.00709 seconds