From: <md...@us...> - 2008-05-27 16:25:32
|
Revision: 5278 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5278&view=rev Author: mdboom Date: 2008-05-27 09:25:28 -0700 (Tue, 27 May 2008) Log Message: ----------- Fix log/linear toggle. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/backend_bases.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-05-27 16:05:57 UTC (rev 5277) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-05-27 16:25:28 UTC (rev 5278) @@ -712,6 +712,9 @@ self.transScale.set( mtransforms.blended_transform_factory( self.xaxis.get_transform(), self.yaxis.get_transform())) + if hasattr(self, "lines"): + for line in self.lines: + line._transformed_path.invalidate() def get_position(self, original=False): 'Return the a copy of the axes rectangle as a Bbox' Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-05-27 16:05:57 UTC (rev 5277) +++ trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-05-27 16:25:28 UTC (rev 5278) @@ -1201,16 +1201,14 @@ event.inaxes.grid() self.canvas.draw() elif event.key == 'l': - warnings.warn('log scale toggling under construction') - if 0: - ax = event.inaxes - scale = ax.get_yscale() - if scale=='log': - ax.set_yscale('linear') - ax.figure.canvas.draw() - elif scale=='linear': - ax.set_yscale('log') - ax.figure.canvas.draw() + ax = event.inaxes + scale = ax.get_yscale() + if scale=='log': + ax.set_yscale('linear') + ax.figure.canvas.draw() + elif scale=='linear': + ax.set_yscale('log') + ax.figure.canvas.draw() elif event.key is not None and (event.key.isdigit() and event.key!='0') or event.key=='a': # 'a' enables all axes This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |