I'm relatively new to python and am developing a pyqt GUI. I want to provide a checkbox option to show/hide a plot's legend. Is there a way to hide a legend?
I've tried using pyplot's '_nolegend_
' and it appears to work on select legend entries but it creates a ValueError if applied to all entries.
I can brute force the legend to hide by clearing and redrawing the whole plot but... it's a terrible thing to do, especially with large data sets.
Appreciate any help with this.