gemseo / utils

Show inherited members

matplotlib_figure module

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

gemseo.utils.matplotlib_figure.FigSizeType

The type of a figure size.

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

Save or show a Matplotlib figure.

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

  • show (bool) – Whether to display the Matplotlib figure.

  • file_path (str | Path) – The file path to save the Matplotlib figure. If empty, do not save the figure.

  • fig_size (FigSizeType | None) – The width and height of the figure in inches, e.g. (w, h). If None, use the current size of the figure.

Return type:

None