From: <ef...@us...> - 2009-02-28 20:13:48
|
Revision: 6945 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6945&view=rev Author: efiring Date: 2009-02-28 20:13:38 +0000 (Sat, 28 Feb 2009) Log Message: ----------- Better solution for twinx, twiny, thanks to Jae-Joon Lee Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2009-02-28 18:51:37 UTC (rev 6944) +++ trunk/matplotlib/lib/matplotlib/axes.py 2009-02-28 20:13:38 UTC (rev 6945) @@ -532,11 +532,6 @@ self._frameon = frameon self._axisbelow = rcParams['axes.axisbelow'] - # Attributes for controlling whether axis objects are drawn. - # They are helpers for twinx and twiny. - self._xaxison = True - self._yaxison = True - self._hold = rcParams['axes.hold'] self._connected = {} # a dict from events to (id, func) self.cla() @@ -1652,10 +1647,7 @@ else: self.xaxis.set_zorder(2.5) self.yaxis.set_zorder(2.5) - if self._xaxison: - artists.append(self.xaxis) - if self._yaxison: - artists.append(self.yaxis) + artists.extend([self.xaxis, self.yaxis]) if not inframe: artists.append(self.title) artists.extend(self.tables) if self.legend_ is not None: @@ -6610,7 +6602,7 @@ ax2.yaxis.tick_right() ax2.yaxis.set_label_position('right') self.yaxis.tick_left() - ax2._xaxison = False + ax2.xaxis.set_visible(False) return ax2 def twiny(self): @@ -6630,7 +6622,7 @@ ax2.xaxis.tick_top() ax2.xaxis.set_label_position('top') self.xaxis.tick_bottom() - ax2._yaxison = False + ax2.yaxis.set_visible(False) return ax2 def get_shared_x_axes(self): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |