MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / __init__

Method __init__

site-packages/matplotlib/widgets.py:1251–1274  ·  view source on GitHub ↗

Add a cursor to *ax*. If ``useblit=True``, use the backend-dependent blitting features for faster updates. *lineprops* is a dictionary of line properties.

(self, ax, horizOn=True, vertOn=True, useblit=False,
                 **lineprops)

Source from the content-addressed store, hash-verified

1249 it.
1250 """
1251 def __init__(self, ax, horizOn=True, vertOn=True, useblit=False,
1252 **lineprops):
1253 """
1254 Add a cursor to *ax*. If ``useblit=True``, use the backend-dependent
1255 blitting features for faster updates. *lineprops* is a dictionary of
1256 line properties.
1257 """
1258 AxesWidget.__init__(self, ax)
1259
1260 self.connect_event('motion_notify_event', self.onmove)
1261 self.connect_event('draw_event', self.clear)
1262
1263 self.visible = True
1264 self.horizOn = horizOn
1265 self.vertOn = vertOn
1266 self.useblit = useblit and self.canvas.supports_blit
1267
1268 if self.useblit:
1269 lineprops['animated'] = True
1270 self.lineh = ax.axhline(ax.get_ybound()[0], visible=False, **lineprops)
1271 self.linev = ax.axvline(ax.get_xbound()[0], visible=False, **lineprops)
1272
1273 self.background = None
1274 self.needclear = False
1275
1276 def clear(self, event):
1277 """clear the cursor"""

Callers

nothing calls this directly

Calls 6

connect_eventMethod · 0.80
axhlineMethod · 0.80
get_yboundMethod · 0.80
axvlineMethod · 0.80
get_xboundMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected