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.

Classes:

DatasetPlotFactory()

This factory instantiates a DatasetPlot from its class name.

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

Bases: object

This factory instantiates a DatasetPlot from its class name.

Methods:

create(plot_name, dataset, **options)

Create a plot for dataset.

is_available(plot_name)

Check the availability of a plot for dataset.

Attributes:

plots

The available plot methods for dataset.

Return type

None

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

The available plot methods for dataset.