def __init__(self, ax, **kwargs): onselect = kwargs.pop('onselect', self.dummy) direction = kwargs.pop('direction', 'horizontal') useblit = kwargs.pop('useblit', ax.figure.canvas.supports_blit) SpanSelector.__init__(self, ax, onselect, direction=direction, useblit=useblit, span_stays=False, **kwargs) # The tolerance in points to pick the rectangle sizes self.tolerance = preferences.Plot.pick_tolerance self.on_move_cid = None self._range = None self.step_ax = None self.bounds_check = False self._button_down = False self.snap_size = False self.snap_position = False self.events = Events() self.events.changed = Event(doc=""" Event that triggers when the widget was changed. Arguments: ---------- obj: The widget that changed """, arguments=['obj']) self.events.moved = Event(doc=""" Event that triggers when the widget was moved. Arguments: ---------- obj: The widget that changed """, arguments=['obj']) self.events.resized = Event(doc=""" Event that triggers when the widget was resized. Arguments: ---------- obj: The widget that changed """, arguments=['obj']) self.can_switch = False
def __init__(self, ax, **kwargs): SpanSelector.__init__(self, ax, lambda x, y: x + y, 'horizontal', useblit=False, rectprops=dict(alpha=0.5, facecolor='red'), **kwargs) self.xmin = 0.0 self.xmax = 0.0 self.blocking = m_BlockingMouseInput(ax.get_figure(), mouse_add=1, mouse_pop=2, mouse_stop=3) self.blocking(n=2, timeout=30, show_clicks=False)
def __init__(self, ax, **kwargs): onselect = kwargs.pop('onselect', self.dummy) direction = kwargs.pop('direction', 'horizontal') useblit = kwargs.pop('useblit', ax.figure.canvas.supports_blit) SpanSelector.__init__(self, ax, onselect, direction=direction, useblit=useblit, span_stays=False, **kwargs) # The tolerance in points to pick the rectangle sizes self.tolerance = 1 self.on_move_cid = None self._range = None self.step_ax = None self.bounds_check = False self.buttonDown = False self.snap_size = False self.snap_position = False self.events = Events() self.events.changed = Event(doc=""" Event that triggers when the widget was changed. Arguments: ---------- obj: The widget that changed """, arguments=['obj']) self.events.moved = Event(doc=""" Event that triggers when the widget was moved. Arguments: ---------- obj: The widget that changed """, arguments=['obj']) self.events.resized = Event(doc=""" Event that triggers when the widget was resized. Arguments: ---------- obj: The widget that changed """, arguments=['obj']) self.can_switch = False
def __init__(self, *args, **kwargs): SpanSelector.__init__(self, *args, **kwargs) self._select_none_handler = None self._min_span = 1.0
def __init__(self, *args, **kwargs): SpanSelector.__init__(self, *args, **kwargs)