|
From: <md...@us...> - 2008-11-05 15:15:37
|
Revision: 6365
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6365&view=rev
Author: mdboom
Date: 2008-11-05 15:15:28 +0000 (Wed, 05 Nov 2008)
Log Message:
-----------
Fix bug in zoom rectangle with twin axes
Modified Paths:
--------------
branches/v0_91_maint/CHANGELOG
branches/v0_91_maint/lib/matplotlib/backend_bases.py
Modified: branches/v0_91_maint/CHANGELOG
===================================================================
--- branches/v0_91_maint/CHANGELOG 2008-11-05 15:15:10 UTC (rev 6364)
+++ branches/v0_91_maint/CHANGELOG 2008-11-05 15:15:28 UTC (rev 6365)
@@ -1,3 +1,5 @@
+2008-11-05 Fix bug with zoom to rectangle and twin axes - MGD
+
2008-10-05 Fix problem with AFM files that don't specify the font's
full name or family name. - JKS
Modified: branches/v0_91_maint/lib/matplotlib/backend_bases.py
===================================================================
--- branches/v0_91_maint/lib/matplotlib/backend_bases.py 2008-11-05 15:15:10 UTC (rev 6364)
+++ branches/v0_91_maint/lib/matplotlib/backend_bases.py 2008-11-05 15:15:28 UTC (rev 6365)
@@ -903,7 +903,7 @@
# can't delete the artist
while h:
print "Removing",h
- if h.remove():
+ if h.remove():
self.draw_idle()
break
parent = None
@@ -912,7 +912,7 @@
parent = p
break
h = parent
-
+
def onHilite(self, ev):
"""
Mouse event processor which highlights the artists
@@ -1087,7 +1087,7 @@
# a) otherwise we'd have cyclical imports, since all of these
# classes inherit from FigureCanvasBase
# b) so we don't import a bunch of stuff the user may never use
-
+
def print_emf(self, *args, **kwargs):
from backends.backend_emf import FigureCanvasEMF # lazy import
emf = self.switch_backends(FigureCanvasEMF)
@@ -1097,7 +1097,7 @@
from backends.backend_ps import FigureCanvasPS # lazy import
ps = self.switch_backends(FigureCanvasPS)
return ps.print_eps(*args, **kwargs)
-
+
def print_pdf(self, *args, **kwargs):
from backends.backend_pdf import FigureCanvasPdf # lazy import
pdf = self.switch_backends(FigureCanvasPdf)
@@ -1107,7 +1107,7 @@
from backends.backend_agg import FigureCanvasAgg # lazy import
agg = self.switch_backends(FigureCanvasAgg)
return agg.print_png(*args, **kwargs)
-
+
def print_ps(self, *args, **kwargs):
from backends.backend_ps import FigureCanvasPS # lazy import
ps = self.switch_backends(FigureCanvasPS)
@@ -1123,12 +1123,12 @@
from backends.backend_svg import FigureCanvasSVG # lazy import
svg = self.switch_backends(FigureCanvasSVG)
return svg.print_svg(*args, **kwargs)
-
+
def print_svgz(self, *args, **kwargs):
from backends.backend_svg import FigureCanvasSVG # lazy import
svg = self.switch_backends(FigureCanvasSVG)
return svg.print_svgz(*args, **kwargs)
-
+
def get_supported_filetypes(self):
return self.filetypes
@@ -1138,7 +1138,7 @@
groupings.setdefault(name, []).append(ext)
groupings[name].sort()
return groupings
-
+
def print_figure(self, filename, dpi=None, facecolor='w', edgecolor='w',
orientation='portrait', format=None, **kwargs):
"""
@@ -1176,7 +1176,7 @@
if dpi is None:
dpi = rcParams['savefig.dpi']
-
+
origDPI = self.figure.dpi.get()
origfacecolor = self.figure.get_facecolor()
origedgecolor = self.figure.get_edgecolor()
@@ -1199,12 +1199,12 @@
self.figure.set_edgecolor(origedgecolor)
self.figure.set_canvas(self)
self.figure.canvas.draw()
-
+
return result
def get_default_filetype(self):
raise NotImplementedError
-
+
def set_window_title(self, title):
"""
Set the title text of the window containing the figure. Note that
@@ -1696,6 +1696,8 @@
for cur_xypress in self._xypress:
x, y = event.x, event.y
lastx, lasty, a, ind, lim, trans = cur_xypress
+ if a._sharex or a._sharey:
+ continue
# ignore singular clicks - 5 pixels is a threshold
if abs(x-lastx)<5 or abs(y-lasty)<5:
self._xypress = None
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|