class_docstr: A polygon editor.
  
  Key-bindings
  
    't' toggle vertex markers on and off.  When vertex markers are on,
        you can move them, delete them
  
    'd' delete the vertex under point
  
    'i' insert a vertex at point.  You must be within epsilon of the
        line connecting two existing vertices
class_docstr_tok: ["A","polygon","editor",".","Key-bindings","'t","'","toggle","vertex","markers","on","and","off",".","When","vertex","markers","are","on",",","you","can","move","them",",","delete","them","'d","'","delete","the","vertex","under","point","'","i","'","insert","a","vertex","at","point",".","You","must","be","within","epsilon","of","the","line","connecting","two","existing","vertices"]
docstr: Return the index of the point closest to the event position or *None*
  if no point is within ``self.epsilon`` to the event position.
docstr_tok: ["Return","the","index","of","the","point","closest","to","the","event","position","or","*","None","*","if","no","point","is","within","``","self.epsilon","``","to","the","event","position","."]
code: def get_ind_under_point(self, event):
      """
      Return the index of the point closest to the event position or *None*
      if no point is within ``self.epsilon`` to the event position.
      """
      # display coords
      xy = np.asarray(self.poly.xy)
      xyt = self.poly.get_transform().transform(xy)
      xt, yt = xyt[:, 0], xyt[:, 1]
      d = np.hypot(xt - event.x, yt - event.y)
      (indseq,) = np.nonzero(d == d.min())
      ind = indseq[0]
  
      if d[ind] >= self.epsilon:
          ind = None
  
      return ind
  
file_path: matplotlib/galleries/examples/event_handling/poly_editor.py
imports: import numpy
  from matplotlib.artist import Artist
  from matplotlib.lines import Line2D
label_desc: Use image node_id 4 for calling the PolygonInteractor obj's underlying member method code with example usage: obj.get_ind_under_point(event) and returns: ind