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)
| 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""" |
nothing calls this directly
no test coverage detected