Revision: 8055 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8055&view=rev Author: efiring Date: 2009-12-28 01:34:06 +0000 (Mon, 28 Dec 2009)
Log Message: ----------- Fix bug in Line2D from last commit: restore full recache in unit chane callback Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/lines.py Modified: trunk/matplotlib/lib/matplotlib/lines.py =================================================================== --- trunk/matplotlib/lib/matplotlib/lines.py 2009-12-28 00:21:50 UTC (rev 8054) +++ trunk/matplotlib/lib/matplotlib/lines.py 2009-12-28 01:34:06 UTC (rev 8055) @@ -388,9 +388,9 @@ def set_axes(self, ax): Artist.set_axes(self, ax) if ax.xaxis is not None: - self._xcid = ax.xaxis.callbacks.connect('units', self.recache) + self._xcid = ax.xaxis.callbacks.connect('units', self.recache_always) if ax.yaxis is not None: - self._ycid = ax.yaxis.callbacks.connect('units', self.recache) + self._ycid = ax.yaxis.callbacks.connect('units', self.recache_always) set_axes.__doc__ = Artist.set_axes.__doc__ def set_data(self, *args): @@ -407,8 +407,11 @@ self.set_xdata(x) self.set_ydata(y) - def recache(self): - if self._invalidx: + def recache_always(self): + self.recache(always=True) + + def recache(self, always=False): + if always or self._invalidx: xconv = self.convert_xunits(self._xorig) if ma.isMaskedArray(self._xorig): x = ma.asarray(xconv, float) @@ -417,7 +420,7 @@ x = x.ravel() else: x = self._x - if self._invalidy: + if always or self._invalidy: yconv = self.convert_yunits(self._yorig) if ma.isMaskedArray(self._yorig): y = ma.asarray(yconv, float) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Matplotlib-checkins mailing list Matplotlib-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins