Allowing for checkboxes in the newly added legend would be great. If the PlotWidget gets cluttered the user simply could uncheck certain datasets and replot.
My idea was to handle it internally through the widget and just have an additional visible boolean attribute in the DataSet structure, which could be checked when plotting or you could store it in a separate data structure that mirrors PlotWidget._datasets inside a mapping for faster access and is used to filter a new list on these kinds of changes.
Posting messages would still be required from the legend, as the user or the internal widget would still need to be notified in order to update the datasets.
Allowing for checkboxes in the newly added legend would be great. If the
PlotWidgetgets cluttered the user simply could uncheck certain datasets and replot.My idea was to handle it internally through the widget and just have an additional
visibleboolean attribute in theDataSetstructure, which could be checked when plotting or you could store it in a separate data structure that mirrorsPlotWidget._datasetsinside a mapping for faster access and is used to filter a newliston these kinds of changes.Posting messages would still be required from the legend, as the user or the internal widget would still need to be notified in order to update the datasets.