gemseo / utils

matplotlib_figure module

Services for handling Matplotlib figures, e.g. save and show.

Functions:

save_show_figure(fig, show, file_path)

Save or show a Matplotlib figure.

gemseo.utils.matplotlib_figure.save_show_figure(fig, show, file_path)[source]

Save or show a Matplotlib figure.

Parameters
  • fig (matplotlib.figure.Figure) – The Matplotlib figure to be saved or shown.

  • show (bool) – If True, display the Matplotlib figure.

  • file_path (Union[str, pathlib.Path]) – The file path to save the Matplotlib figure. If None, do not save the figure.

Return type

None