position a wxPython frame near to a matplotlib point

For those who you wxPython with matplotlib, does anyone know how to do
this or can point me in the right direction?

I would like to pick a point (that part is fine) and then place a
wxFrame near to that point. I'm using something like:

#Note: self is a wxPanel that contains the matplotlib plot.
mouseLocation = wx.GetMousePosition()
pos = self.ScreenToClient(mouseLocation)
self.popup.Move(pos)

but this results in the frame being completely displaced from the
picked point. I've tried a number of different approaches and am
stuck. Any ideas would be appreciated.

Che

C M wrote:

For those who you wxPython with matplotlib, does anyone know how to do
this or can point me in the right direction?

I would like to pick a point (that part is fine) and then place a
wxFrame near to that point. I'm using something like:

#Note: self is a wxPanel that contains the matplotlib plot.
mouseLocation = wx.GetMousePosition()
pos = self.ScreenToClient(mouseLocation)
self.popup.Move(pos)

but this results in the frame being completely displaced from the
picked point.

just thinking out loud here, but when you call self.popup.Move(), I think that's screen coordinates, but you called self.ScreenToClient().

I think you want something like:

mouseLocation = wx.GetMousePosition()
self.popup.Move(pos)

Or you could get the coords from the mouse event instead, which will be in client coords.

I'd print out some of those coords, so can make sense of them

-Chris

ยทยทยท

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...