MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / __init__

Method __init__

lib/matplotlib/widgets.py:2316–2347  ·  view source on GitHub ↗
(self, ax, onselect=None, useblit=False, button=None,
                 state_modifier_keys=None, use_data_coordinates=False)

Source from the content-addressed store, hash-verified

2314 """
2315
2316 def __init__(self, ax, onselect=None, useblit=False, button=None,
2317 state_modifier_keys=None, use_data_coordinates=False):
2318 super().__init__(ax)
2319
2320 self._visible = True
2321 if onselect is None:
2322 self.onselect = lambda *args: None
2323 else:
2324 self.onselect = onselect
2325 self._useblit = useblit
2326 self.connect_default_events()
2327
2328 self._state_modifier_keys = dict(move=' ', clear='escape',
2329 square='shift', center='control',
2330 rotate='r')
2331 self._state_modifier_keys.update(state_modifier_keys or {})
2332 self._use_data_coordinates = use_data_coordinates
2333
2334 if isinstance(button, Integral):
2335 self.validButtons = [button]
2336 else:
2337 self.validButtons = button
2338
2339 # Set to True when a selection is completed, otherwise is False
2340 self._selection_completed = False
2341
2342 # will save the data (position at mouseclick)
2343 self._eventpress = None
2344 # will save the data (pos. at mouserelease)
2345 self._eventrelease = None
2346 self._prev_event = None
2347 self._state = set()
2348
2349 @property
2350 def useblit(self):

Callers

nothing calls this directly

Calls 3

__init__Method · 0.45
updateMethod · 0.45

Tested by

no test coverage detected