When working with MatPlotLib I constantly find myself creating a plot, and some time later (could be years) I realize that I'm not fully satisfied with a certain detail in my plot. This could be things like:
- axis ranges
- axis labels, tick labels, tick placing, grid, ...
- all font sizes (ticks, labels, legend)
- plot coloring, choice of markers
- plot annotation, for instance, I want to manually comment on the plot etc
My question is whether there is an approach that makes applying such modifications convenient?
Currently every modification means that I have to completely regenerate the whole plot anew, just with a minor adjustment in to plotting logic. This is certainly doable (and in some cases preferable!) but I always have to store the whole underlying data, the whole plotting logic, and some (of my own) modules (since I'm afraid I might break compatibility at some point in the future).
I'm wondering whether it is possible to simply persist/serialize the full plotting state. In other words: instead of storing the logic that generates a plot, can I simply take the "whole MatPlotLib state", write it disk, and restore the state later in order to apply minor modifications (maybe even interactively in iPython)?