Strange matplotlib event behaviour in wxpython 2.9 vs 2.8

The example script consists of a AUI with two panes, a plot pane at the top and a blank pane at the bottom. For some reason I don’t know of the figure canvas seems to be extended from the top pane to the whole window after any of the right click menu items have been chosen using wxpython 2.9. In 2.8 the script behaves as expected, the PlotPanel’s OnEvent is only triggered if I click in the top pane.

To show this weird behavior I do this:

First before doing anything else, left mouse clicks in the frame only outputs to the console when the click is in the top pane. This is normal behavior. However after selecting any of the menu alternatives after a right mouse click in the top pane, the behavior turns odd. No matter where I click in the window it is interpreted as a click in the figure canvas in the top pane.

For the record I am using 2.9.2.4 (Mac) and 2.8.12.1 (XP).

Am I doing anything wrong here, or is this a bug?

wxpython_matplotlib_event.py (2.44 KB)

Hi,
The attached code seems to work ok for me using wxpython 2.9.2.4, py
2.7.2 on winXP (it is the same in wx 2.8, 2.9.1 and 2.9.2 - "OnEvent
in PlotPanel" is only printed on clicking in the upper canvas pane,
regardless of the options selected in the context menu).

There might probably be some differences between Mac and Windows in
this regard (?)

(I encountered other problems with matplotlib between the recent
versions of wxpython, but they only affect wx backends, not wxagg
http://groups.google.com/group/wxpython-users/browse_thread/thread/bc6fb9349e2f5e77?pli=1
)

Regards,
   vbr

···

2011/10/10 Åke Kullenberg <ake.kullenberg@gmail.com>:

The example script consists of a AUI with two panes, a plot pane at the top
and a blank pane at the bottom. For some reason I don't know of the figure
canvas seems to be extended from the top pane to the whole window after any
of the right click menu items have been chosen using wxpython 2.9. In 2.8
the script behaves as expected, the PlotPanel's OnEvent is only triggered if
I click in the top pane.
To show this weird behavior I do this:
First before doing anything else, left mouse clicks in the frame only
outputs to the console when the click is in the top pane. This is normal
behavior. However after selecting any of the menu alternatives after a right
mouse click in the top pane, the behavior turns odd. No matter where I click
in the window it is interpreted as a click in the figure canvas in the top
pane.
For the record I am using 2.9.2.4 (Mac) and 2.8.12.1 (XP).
Am I doing anything wrong here, or is this a bug?

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

How could I go about checking what goes wrong? I am not intimately
familiar with the interaction between wxPython and Matplotlib. I don't
really know how to figure if the error is on wxPython or Matplotlib.
Btw, I did ask this question in the Matplotlib-users mailing-list too.
Perhaps they can shed some light on the problem.

···

On Oct 10, 10:30 pm, Vlastimil Brom <vlastimil.b...@gmail.com> wrote:

2011/10/10 Åke Kullenberg <ake.kullenb...@gmail.com>:

> The example script consists of a AUI with two panes, a plot pane at the top
> and a blank pane at the bottom. For some reason I don't know of the figure
> canvas seems to be extended from the top pane to the whole window after any
> of the right click menu items have been chosen using wxpython 2.9. In 2.8
> the script behaves as expected, the PlotPanel's OnEvent is only triggered if
> I click in the top pane.
> To show this weird behavior I do this:
> First before doing anything else, left mouse clicks in the frame only
> outputs to the console when the click is in the top pane. This is normal
> behavior. However after selecting any of the menu alternatives after a right
> mouse click in the top pane, the behavior turns odd. No matter where I click
> in the window it is interpreted as a click in the figure canvas in the top
> pane.
> For the record I am using 2.9.2.4 (Mac) and 2.8.12.1 (XP).
> Am I doing anything wrong here, or is this a bug?

> --
> To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
> or visithttp://groups.google.com/group/wxPython-users?hl=en

Hi,
The attached code seems to work ok for me using wxpython 2.9.2.4, py
2.7.2 on winXP (it is the same in wx 2.8, 2.9.1 and 2.9.2 - "OnEvent
in PlotPanel" is only printed on clicking in the upper canvas pane,
regardless of the options selected in the context menu).

There might probably be some differences between Mac and Windows in
this regard (?)

(I encountered other problems with matplotlib between the recent
versions of wxpython, but they only affect wx backends, not wxagghttp://groups.google.com/group/wxpython-users/browse_thread/thread/bc…
)

Regards,
vbr