'on mouse movement'

def motion_notify_callback(self, event):

    if (not self.showverts):
        return
    if (self._ind is None):
        return
    if (event.inaxes is None):
        return
    if (event.button != 1):
        return
    (x, y) = (event.xdata, event.ydata)
    vertices = self.pathpatch.get_path().vertices
    vertices[self._ind] = (x, y)
    self.line.set_data(zip(*vertices))
    self.canvas.restore_region(self.background)
    self.ax.draw_artist(self.pathpatch)
    self.ax.draw_artist(self.line)
    self.canvas.blit(self.ax.bbox)
