From: <as...@us...> - 2009-06-01 21:41:46
|
Revision: 7168 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7168&view=rev Author: astraw Date: 2009-06-01 21:41:21 +0000 (Mon, 01 Jun 2009) Log Message: ----------- add cla() support for spines Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/spines.py Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2009-06-01 17:19:05 UTC (rev 7167) +++ trunk/matplotlib/CHANGELOG 2009-06-01 21:41:21 UTC (rev 7168) @@ -1,3 +1,5 @@ +2009-06-01 cla() support for spines - ADS + 2009-06-01 Removed support for gtk < 2.4. - EF 2009-05-29 Improved the animation_blit_qt4 example, which was a mix Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2009-06-01 17:19:05 UTC (rev 7167) +++ trunk/matplotlib/lib/matplotlib/axes.py 2009-06-01 21:41:21 UTC (rev 7168) @@ -906,6 +906,8 @@ # Note: this is called by Axes.__init__() self.xaxis.cla() self.yaxis.cla() + for name,spine in self.spines.iteritems(): + spine.cla() self.ignore_existing_data_limits = True self.callbacks = cbook.CallbackRegistry(('xlim_changed', Modified: trunk/matplotlib/lib/matplotlib/spines.py =================================================================== --- trunk/matplotlib/lib/matplotlib/spines.py 2009-06-01 17:19:05 UTC (rev 7167) +++ trunk/matplotlib/lib/matplotlib/spines.py 2009-06-01 21:41:21 UTC (rev 7168) @@ -69,6 +69,12 @@ if self.axis is not None: self.axis.cla() + def cla(self): + 'Clear the current spine' + self._position = None # clear position + if self.axis is not None: + self.axis.cla() + @allow_rasterization def draw(self,renderer): "draw everything that belongs to the spine" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |