pyopmnearwell.utils.plotting module

Helper functions for plotting.

pyopmnearwell.utils.plotting.save_fig_and_data(fig: Figure, path: str | Path) None

Save a pyplot figure to an .svg file and save the data to a .pickle file.

Args:

fig (matplotlib.figure.Figure): The figure to save. path (str | pathlib.Path): The path to save the figure and data to.

Returns:

None

pyopmnearwell.utils.plotting.set_latex_params(latex: bool = True) None

Set the LaTeX parameters for matplotlib.

This function sets the font to be sans-serif and the text to be normal weight.

Returns:

None