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

def get_ind_under_point(self, event):

    xy = np.asarray(self.pathpatch.get_path().vertices)
    xyt = self.pathpatch.get_transform().transform(xy)
    (xt, yt) = (xyt[:, 0], xyt[:, 1])
    d = np.sqrt((((xt - event.x) ** 2) + ((yt - event.y) ** 2)))
    ind = d.argmin()
    if (d[ind] >= self.epsilon):
        ind = None
    return ind
