'get the index of the vertex under point if within epsilon tolerance'

def get_ind_under_point(self, event):

    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
