maintaining_current_plt

PlasmaCalcs.plotting.plot_tools.currently_active.maintaining_current_plt(*maintain, default=['all'])

returns context manager which restores current figure, axes, image upon exit.

If the original figure / axes / image was None, it will not be restored to None. [TODO] change this?
maintain: strings from (‘figure’, ‘axes’, ‘image’, ‘all’)
maintain (only) these values. E.g. [‘figure’] –> maintain current figure and axes.
‘all’ –> maintain all values.
default: list of strings, default [‘all’]
if len(maintain)==0, instead use maintain = default.
see also: using_current_plt