From: John H. <jd...@gm...> - 2007-10-04 14:28:25
|
On 10/4/07, Michael Droettboom <md...@st...> wrote: > def invert_xaxis(self, invert=True): > > "Invert the x-axis if 'invert' is True." > I like this approach over a state flag (I agree with Eric that it would be nice to avoid if we can since it complicates communication between different parts of the Axes and Axis code). But why do we need an invert kwarg. I would imagine that invert_xaxis might work like def invert_xaxis(self): left, right = self.get_xlim() self.set_xlim(right, left) then you could toggle back and forth and xaxis_inverted would work as you propose. JDH |