conflict between widget_draw and plot objects [message #35553] |
Fri, 20 June 2003 14:49 |
lockhart
Messages: 2 Registered: June 2003
|
Junior Member |
|
|
Sorry, newbie question/problem.
In this program I'm writing, the user can click a button which pops up
an interface that allows them to select and view an image, and choose
coordinates in that image, and then when they close, exports those
coordinates back.
The next stage for the user uses that same image, calculates the
centroid of the object near the previously selected coordinates
(selected in the previous window), does a line cut through the
centroid, then shows a plot of the values in that line cut (using the
plot command).
That works fine.
But, when I close the plot window, then go back to the first step of
selecting/viewing an image, the pixel coordinates generated are really
wierd, just way out there in neverland. I'm making the (possibly
false) assumption that this has something to do with the plotting done
in the second step. If I take out the plot line, I can go back to the
first stage no problems.
To get the pixel values I'm using:
pix = (convert_coord(event.x,event.y,/DEVICE,/TO_DATA))[0:1]
It seems to work fine, unless I've plotted something.
I'm guessing somehow I'm capturing the wrong device coordinates or
something, but I don't understand why.
Any ideas?
Thanks,
-Charles
|
|
|