PyQt integration problem with the Navigation Toolbar

Hello,

I have a demo application integrating a dynamic mpl plot into a PyQt GUI.
The plot is dynamic in the sense that the user can manipulate it through the
use of the GUI's (PyQt) widgets and controls. The code is in:
http://eli.thegreenplace.net/files/prog_code/qt_mpl_bars.py.txt

Now, I have a slight problem. When the plot is zoomed with the toolbar's
standard "zoom to rectangle" tool, and then the window is switched in an out
of focus, the zoom level disappears and the plot comes bac k to "home" mode.

How can I make it persist? Can I somehow query the zoom state of the plot
and restore it?

Thanks
Eli

ยทยทยท

--
View this message in context: http://www.nabble.com/PyQt-integration-problem-with-the-Navigation-Toolbar-tp22736288p22736288.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Hello,

I have a demo application integrating a dynamic mpl plot into a PyQt GUI.
The plot is dynamic in the sense that the user can manipulate it through the
use of the GUI's (PyQt) widgets and controls. The code is in:
http://eli.thegreenplace.net/files/prog_code/qt_mpl_bars.py.txt

Now, I have a slight problem. When the plot is zoomed with the toolbar's
standard "zoom to rectangle" tool, and then the window is switched in an out
of focus, the zoom level disappears and the plot comes bac k to "home" mode.

How can I make it persist? Can I somehow query the zoom state of the plot
and restore it?

Thanks
Eli
  

Ok so at least you can reproduce with bug :wink:
Maybe we should ask matplolib to render into a buffer widget...but I not
sure.
However, I'm pretty sure we should not call matplotlib on every draw event.

Any ideas??

Xavier