IDL data coordinates in a widget [message #28744] |
Tue, 08 January 2002 23:49 |
jicicuendez
Messages: 12 Registered: November 2001
|
Junior Member |
|
|
Hi,
Can anyone help me with this?
I am trying to set up an interactive widget that provides the data
value corresponding to a plot on a widget_draw pannel. I am stuck as I
can't manage to obtain the right data coordinates of the system.
First I was using a multiple plot, and from the motion_event obtaining
x,y coordinates on the draw pannel. This seem to work fine and I
obtain the device coordinates, but when I try to use
data=CONVERT_COORD(x,y,/DEVICE, /TO_DATA)
the output I get does not make any sense and does not match my data
(some of them are negative values). I thought that this could be an
interference when using a multiple plot so I tried to decompose my
whole plot into individual ones (tedious way) and apply this described
method individually and still does not work and even though the values
are better, for fixed x intervals in the plot the calculated x length
varies.
Does enyone know why this is happenning? Is there any solution to this
or another way do solve this?
This is the first time I use widgets and I am a bit dummy so any help
would be much appreciated.
Many thanks in advance,
Juan Cicuendez
|
|
|