def redo(self, axes): """ Rezooms the axes. """ if not self.can_redo(axes): return x, y = self._get_redo_history(axes).pop() return AxesLimits.set(self, axes, x, y)
def set(self, axes, xrange, yrange): """ Override base class functionality to clear redo history. """ if not self.zoomed(axes): for i in self._get_redo_history(axes): self._get_redo_history(axes).pop() return AxesLimits.set(self, axes, xrange, yrange)
def restore(self, axes): """ Override base class functionality to add action to redo history. """ if self.zoomed(axes): self._get_redo_history(axes).append((axes.get_xlim() , axes.get_ylim())) return AxesLimits.restore(self, axes)
def restore(self, axes): """ Override base class functionality to add action to redo history. """ if self.zoomed(axes): self._get_redo_history(axes).append( (axes.get_xlim(), axes.get_ylim())) return AxesLimits.restore(self, axes)
def __init__(self): AxesLimits.__init__(self) self.redo_history = weakref.WeakKeyDictionary()
def __init__(self): autoscaleUnzoom = False # changed in wxmpl 1.3.0 AxesLimits.__init__(self, autoscaleUnzoom) self.redo_history = weakref.WeakKeyDictionary()