I was trying to make updating plot not cause to change zoom.
I have wxPython program with embedded plot and I can change some
parameters what makes some changes on the plot. User should be able
to zoom and then change these parameters and see how it influences
plot, OTOH it should be easy to show whole plot, eg. using home button.
Perhaps I'm wrong, but I think its quite common requirement.
BTW pressing home button calls toolbar's draw() twice:
RCS file: /cvsroot/matplotlib/matplotlib/lib/matplotlib/backend_bases.py,v
retrieving revision 1.48
diff -u -u -1 -r1.48 backend_bases.py
--- lib/matplotlib/backend_bases.py 12 Apr 2005 16:07:12 -0000 1.48
+++ lib/matplotlib/backend_bases.py 28 Apr 2005 13:44:23 -0000
@@ -948,3 +948,2 @@
My plot update looks like this:
# toolbar is NavigationToolbar2
old_view = toolbar._views()
toolbar.update() #clear zoom history
if old_view: #don't change current view
I'd like to hear what do you think about it. Is a simpler way to make
the same? I'm writting my first mini-program that uses MPL and don't
know it well.
And why wx and gtk toolbars are different -- in GTK button descriptions
are in tooltips and x,y position is displayed in toolbar, and in wx
statusbar is used? Are they different by design? I prefer the first way,
And last thing: what do you think about making toolbar2 more hmm..
interactive(?), i mean disabled back/forward buttons whan there is no
history, pressed pan/zoom buttons when in pan/zoom mode etc?
I don't know if I'll try to do it, but if someone would do it,
would it be included in MPL?
Marcin Wojdyr | http://www.unipress.waw.pl/~wojdyr/