[SciPy-user] Getting X, Y coordinates from Chaco plots

Marco.LaRosa at csiro.au Marco.LaRosa at csiro.au
Tue Aug 19 00:18:22 EDT 2003


Hi all,
 
I just figured out how to get the X Y coordinates from the window. However,
I also just realised that that's not what I need. Consider this:
 
I have a plot window which displays (obviously enough) 1 plot. What I want
is to let the user pick a point on the plot and return the value of the x
axis at that point (e.g 1, 10, 400 etc).
 
I can get the width of the window itself. I can get the x, y coordinates of
the point selected. However, I don't know how to get the starting x,y
coordinates of the actual plot itself. Does anyone know how to do this?
 
Alternately, is there a direct way of returning the value of the axis at the
point that the user selects?
 
TIA,
Marco.
 
P.S. To the authors of chaco. Awesome package!!!!

-----Original Message-----
From: Marco.LaRosa at csiro.au [mailto:Marco.LaRosa at csiro.au] 
Sent: Tuesday, 19 August 2003 1:51 PM
To: scipy-user at scipy.net
Subject: [SciPy-user] Getting X, Y coordinates from Chaco plots




Hi all, 

I am using chaco and I can't figure out how to get the X coordinate of the
cursor.  Deriving from a PlotWindow, the following line gives me the cursor.


plot.set(cursor_type = 'index') 

What I want now is to use the cursor to select a value from the plot and
return control to the calling class. 

Can that be done? How? 

TIA 
Marco 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20030819/8c5a7d60/attachment.html>


More information about the SciPy-User mailing list