class_docstr: A cross hair cursor.
class_docstr_tok: ["A","cross","hair","cursor","."]
code: def on_mouse_move(self, event):
      if not event.inaxes:
          need_redraw = self.set_cross_hair_visible(False)
          if need_redraw:
              self.ax.figure.canvas.draw()
      else:
          self.set_cross_hair_visible(True)
          x, y = event.xdata, event.ydata
          # update the line positions
          self.horizontal_line.set_ydata([y])
          self.vertical_line.set_xdata([x])
          self.text.set_text(f"x={x:1.2f}, y={y:1.2f}")
          self.ax.figure.canvas.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 3 for calling the Cursor obj's underlying member method code with example usage: obj.on_mouse_move(event) without return types