Hmm, I thought I sent a reply to this earlier this week, see below > From: "Christopher Hylands Brooks" <[EMAIL PROTECTED]> > To: Darine Abdelahad <[EMAIL PROTECTED]> > Subject: Re: Ptplot mouse code > Cc: [EMAIL PROTECTED] > Date: Wed, 03 Sep 2003 09:04:41 -0700 > > Take a look at the zoom code in PlotBox.java > It converts from window coordinates to plot coordinates. > > See also > > http://ptolemy.eecs.berkeley.edu/java/ptplot5.2/ptolemy/plot/doc/ptplotfaq.htm#ptplot > potential features > -Christopher
-------- Hi, I have a question: I want the user to be able to click on a point on the graph in order to obtain more information about it. To do so, I need the mouse click to retur n the coordinates of the point. So I tried to add to the Plot object an instance of a class that implements the MouseListener interface. And then in the mouseClicked functi on, the getX()and getY() methods of the MouseEvent are supposed to return the coordinates of the point where the user clicked. But these coordinates are given with respect to the window where the plot is found, whereas I need the coordinates with respect to the Xaxis and Yaxis of the plot (that is the coordinates assigned to the point by my application). So I was wondering how I can obtain these coordinates upon a mouse click. Can anyone help me with that? Thanx -------- ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]