Design and implement a PlotHelper class
For use with the matplotlib
-based ExternalPlotCreator
and derived classes, a PlotHelper
would be very useful.
It could and would take care of setting up a figure, entering a style sheet context, and calling helper functions which set axis labels, ticks, title, legend, ...
In order to fit with the whole PlotManager
framework, it is important that it is highly customisable. It should be configurable wholly via parameters stored and passed along in nested dicts. Ideally, the whole helper framework could be controlled from that configuration. At the same time, it need be possible to set default values in (or near) the scope of the plot function. We should find a convenient way to specify these defaults.
Other possibly interesting features or things to consider:
- Be able to call a specific helper function from within the plot function. E.g.: creating a colour bar might have to happen at a certain point.
- Should be able to disable/enable all helpers from the configuration
- Should leave room to work with subplots, i.e.: work fully
ax
-based?
This issue is to discuss all these questions, the desired features, and to design and implement a first interface for the PlotHelper
class. It need only be functional to the extent that we can start working on it in separate MRs.
How to test the implementation
pytest
People involved
Team of utopia#276 (closed), @jeremiastraub @blsqr @unaifischer @davidelegacci