Cursor problem when switching windows [message #79620] |
Mon, 19 March 2012 12:08 |
dshadovi
Messages: 15 Registered: March 2012
|
Junior Member |
|
|
I am haing a problem with CURSOR. When I plot something in a window,
plot something in another window, and then attempt to get the value of
a point in the first window, I get the value of the corresponding
point in the second window. Is there a way to recover values from the
first window without replotting?
I'm seeing this in IDL 6.4 and 8.1.
; Create window 1
window, 1
; Plot something in window 1
@cntour1
; Extract values from window 1
cursor, x, y
; Left-click on a point in window 1
; Print the values
print, x, y
; Create window 2
window, 2
; Plot something in window 2
@plot04
; Extract values from window 2
cursor, x, y
; Left-click on a point in window 2
; Print the values
print, x, y
; Return to window 1
wset, 1
; Extract values from window 1
cursor, x, y
; Left-click on a point in window 1
; Print the values
print, x, y
; The values that appear are for window 2!
|
|
|