class_docstr: A cross-hair cursor using blitting for faster redraw.
class_docstr_tok: ["A","cross-hair","cursor","using","blitting","for","faster","redraw","."]
code: def __init__(self, ax):
      self.ax = ax
      self.background = None
      self.horizontal_line = ax.axhline(color="k", lw=0.8, ls="--")
      self.vertical_line = ax.axvline(color="k", lw=0.8, ls="--")
      # text location in axes coordinates
      self.text = ax.text(0.72, 0.9, "", transform=ax.transAxes)
      self._creating_background = False
      ax.figure.canvas.mpl_connect("draw_event", self.on_draw)
  
file_path: matplotlib/galleries/examples/event_handling/cursor_demo.py
imports: import matplotlib.pyplot
  import numpy
  from matplotlib.backend_bases import MouseEvent
label_desc: Use image node_id 1 to create a new BlittedCursor object  with example: obj = BlittedCursor(ax)