class_docstr: A cross-hair cursor that snaps to the data point of a line, which is
  closest to the *x* position of the cursor.
  
  For simplicity, this assumes that *x* values of the data are sorted.
class_docstr_tok: ["A","cross-hair","cursor","that","snaps","to","the","data","point","of","a","line",",","which","is","closest","to","the","*","x","*","position","of","the","cursor",".","For","simplicity",",","this","assumes","that","*","x","*","values","of","the","data","are","sorted","."]
code: def set_cross_hair_visible(self, visible):
      need_redraw = self.horizontal_line.get_visible() != visible
      self.horizontal_line.set_visible(visible)
      self.vertical_line.set_visible(visible)
      self.text.set_visible(visible)
      return need_redraw
  
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 2 for calling the SnappingCursor obj's underlying member method code with example usage: obj.set_cross_hair_visible(visible) and returns: need_redraw