I believe this feature, which has been requested a number of times, but is still missing from matplotlib is genuinely useful for interactive plotting. Moreover, I’ve heard matlab has it…
Here’s a potential solution to cover my simple plotting needs. The goal is not to support all the weird and wonderful matplotlib features, if you need those you probably work only from script anyway. My approach is based on figureoptions.py in matplotlib.backends.qt4_editor (or the more recent version in spyder):
- Save figure file:
. get xy data for each plot object
. get object styles (color of plots, linestyle, etc.)
. save to auto-generated python script
- Open figure file:
The script will open a new figure, recreate all objects and then apply styles to each object.
You have full control over the figure and its contents again for editing
Using this approach backwards compatibility should not be a issue (as demonstrated by figureoptions). On the other hand not all matplotlib objects/options will be supported.
Any comments or suggestions ?