gemseo / post / dataset

Hide inherited members

base_plot module

A base plot class.

class gemseo.post.dataset.base_plot.BasePlot(dataset, common_settings, specific_settings, *specific_data, **engine_parameters)[source]

Bases: object

A base plot class.

A DatasetPlot defines a graphical concept (e.g. radar chart, lines, etc.) while a BasePlot with the same class name implements this concept from a visualization library.

The graphical concept uses both common settings (e.g. figure size, colors, x-label, etc.) and specific ones (e.g. bar width for a bar plot, radial ticks for a radar chart, etc.).

Parameters:
  • dataset (Dataset) – The dataset passed to the DatasetPlot. To be used when an information item is missing in *specific_data.

  • common_settings (PlotSettings) – The settings common to many plot classes.

  • specific_settings (NamedTuple) – The settings specific to this plot class.

  • *specific_data (Any) – The data specific to this plot class.

  • **engine_parameters (Any) – The parameters specific to the plot engine.

save(file_path, directory_path, file_name, file_format, file_name_suffix)[source]

Save the plot on the disk.

Parameters:
  • file_path (str | Path) – The path of the file to save the figures. If empty, create a file path from directory_path, file_name and file_format.

  • directory_path (str | Path) – The path of the directory to save the figures. If empty, use the current working directory.

  • file_name (str) – The name of the file to save the figures. If empty, use a default one generated by the post-processing.

  • file_format (str) – A file format, e.g. ‘png’, ‘pdf’, ‘svg’, …

  • file_name_suffix (str) – The suffix to be added to the file name.

Returns:

The file paths of the plots.

Return type:

tuple[str, …]

abstract show()[source]

Display the plot.

Return type:

None

abstract property figures: list[Any]

The figures.