Following is the piece of code that I'm using to plot multiple curves but how can I define a function to enable mouse clicks to delete any specific curve by mouse click to select any specific curve and delete it using keyboard 'del' button.
def plot_lib(self, X, Y, style_=QtCore.Qt.SolidLine):