zoom does not work properly when embedding with glade/gtk

Hi,

I do see strange behavior when using "Zoom to rectangle"
on my figures embedded in gtk through glade.
When clicking on the figure and start drawing the rectangle,
the bottom axis moves up as well as the graph which screw up
the whole figure during the rectangle definition. When releasing
the mouse button the figure looks ok.

I attach a small script together with glade file (slightly modified
from the matplotlib examples) that allows to reproduce the problem:
-> launch the script, press the "Zoom to rectangle button" and start
drawing the rectangle region on the graph, you will see the issue...
It as to be noticed that pure gtk version (without glade) does work
properly.

I'm on MacOsX 10.5.8 using gtk.gtk_version (2, 18, 6)
and gtk.pygtk_version (2, 16, 0) with python 2.6

Hope someone could help me solving this annoying issue.

Regards,

David

mpl_with_glade_problem.py (3.06 KB)

mpl_with_glade.glade (9.79 KB)

Just for the records, the fix now applied to the svn and
discuss on this list under """Plot moves while using the "Zoom to
rectangle" button""" thread also fixes the problem I reported
earlier this year (see email below).

Best Regards,

David

Le 20/01/10 18:01, David Trem a �crit :

···

Hi,

I do see strange behavior when using "Zoom to rectangle"
on my figures embedded in gtk through glade.
When clicking on the figure and start drawing the rectangle,
the bottom axis moves up as well as the graph which screw up
the whole figure during the rectangle definition. When releasing
the mouse button the figure looks ok.

I attach a small script together with glade file (slightly modified
from the matplotlib examples) that allows to reproduce the problem:
-> launch the script, press the "Zoom to rectangle button" and start
drawing the rectangle region on the graph, you will see the issue...
It as to be noticed that pure gtk version (without glade) does work
properly.

I'm on MacOsX 10.5.8 using gtk.gtk_version (2, 18, 6)
and gtk.pygtk_version (2, 16, 0) with python 2.6

Hope someone could help me solving this annoying issue.

Regards,

David

David,

I am glad to see that this solved your problem. Sorry for the lack of a follow-up on your issue. I guess the solution to your problem wasn’t entirely obvious at that time. I take it that no ticket was filed for it that we have to close?

Ben Root

···

On Tue, Jul 27, 2010 at 12:11 AM, David Trem <david.trem@…322…9…> wrote:

Just for the records, the fix now applied to the svn and

discuss on this list under “”"Plot moves while using the "Zoom to

rectangle" button"“” thread also fixes the problem I reported

earlier this year (see email below).

Best Regards,

David

Le 20/01/10 18:01, David Trem a écrit :

Hi,

I do see strange behavior when using “Zoom to rectangle”

on my figures embedded in gtk through glade.

When clicking on the figure and start drawing the rectangle,

the bottom axis moves up as well as the graph which screw up

the whole figure during the rectangle definition. When releasing

the mouse button the figure looks ok.

I attach a small script together with glade file (slightly modified

from the matplotlib examples) that allows to reproduce the problem:

→ launch the script, press the “Zoom to rectangle button” and start

drawing the rectangle region on the graph, you will see the issue…

It as to be noticed that pure gtk version (without glade) does work

properly.

I’m on MacOsX 10.5.8 using gtk.gtk_version (2, 18, 6)

and gtk.pygtk_version (2, 16, 0) with python 2.6

Hope someone could help me solving this annoying issue.

Regards,

David