'Remove the line.'

def remove(self):

    self.line.figure.canvas.mpl_disconnect(self.cidpress)
    self.line.figure.canvas.mpl_disconnect(self.cidrelease)
    self.line.figure.canvas.mpl_disconnect(self.cidmotion)
    self.line.figure.axes[0].lines.remove(self.line)
