pyopmnearwell.utils.plotting module#
Save pyopmnearwell figures and the data needed to reproduce them.
- save_fig_and_data(fig, path)[source]#
Save a figure and its plotting data.
The figure is written as an SVG file and the complete Matplotlib figure object is serialized to a Pickle file with the same stem. The input figure is closed after both files have been written.
- Parameters:
fig (matplotlib.figure.Figure) -- Figure to save and serialize.
path (str | pathlib.Path) -- Output path. Existing suffixes are replaced by
.svgand.pickle.
- Return type:
None