gemseo / post / dataset

factory module

A factory to create instances of DatasetPlot.

The module factory contains the DatasetPlotFactory class which is a factory to instantiate a DatasetPlot from its class name. The class can be internal to GEMSEO or located in an external module whose path is provided to the constructor. It also provides a list of available cache types and allows you to test if a cache type is available.

class gemseo.post.dataset.factory.DatasetPlotFactory[source]

Bases: object

This factory instantiates a DatasetPlot from its class name.

create(plot_name, dataset, **options)[source]

Create a plot for dataset.

Parameters:
  • plot_name (str) – The name of a plot method for dataset (its class name).

  • dataset (Dataset) – The dataset to visualize.

  • options – The additional options specific to this plot method.

Returns:

A plot method built from the provided dataset.

Return type:

DatasetPlot

is_available(plot_name)[source]

Check the availability of a plot for dataset.

Parameters:

plot_name (str) – The name of a plot method for dataset (its class name).

Returns:

True if the plot method is available.

Return type:

bool

property plots: list[str]

The available plot methods for dataset.