Refactor plotters
Description of work Refactor all the plotters to use generator constructs, gridspecs and attempt to reduce code-duplication.
Fixes Prevent number of plots corresponding to number of datasets.
To test Try to break plotting with weird sequences of button presses.
I have been testing the plotter. What I found so far is:
-
Gridplots of 1D datasets have an empty legend. -
If I plot into
GridorSinglewith legend switched off, and switch it on afterwards, I get an exception: <class 'AttributeError'> 'NoneType' object has no attribute 'set_visible' -
Heatmap plot is labelling the plot axes wrong. In my test, time was shown as Q and Q was shown as time.
-
Heatmap plots start off without any legend. If I switch legend off and on, the legend appears.
-
If I try to plot a vector summary from the plot creator like this
the plot type ends up being Single and not Vectors:
While we do not want to allow Vectors plot type for normal data sets, it should still be possible to use Vectors for vectors.
- For
SingleandHeatmapplots, switching the legend off and on makes all the subplots resize. Before:
After: