def METHOD_NAME(self, curve):
    """Set a curve as active.
    This is called from the context menu and when a legend is clicked.
    :param silx.gui.plot.items.Curve curve:
    """
    plot = curve.getPlot()
    plot.setActiveCurve(
        curve.getName() if curve != plot.getActiveCurve() else None)