Toggles a series on or off. This function is called when a series name is clicked in the legend of a plot.
WARNING: This is an internal function. Its use in user code is not recommended or supported, and its signature can change in future updates without warning. Use one of the suggested functions above instead, if applicable.
Parameters
event — matplotlib.Event, required
The Matplotlib event object corresponding to the click.
Notes and Examples