# Plotting a dataset¶

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:

 This factory instantiates a DatasetPlot from its class name.
class gemseo.post.dataset.factory.DatasetPlotFactory[source]

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.

An abstract class to plot data from a Dataset.

The dataset_plot module implements the abstract DatasetPlot class whose purpose is to build a graphical representation of a Dataset and to display it on screen or save it to a file.

This abstract class has to be overloaded by concrete ones implementing at least method DatasetPlot._run().

Classes:

 DatasetPlot(dataset) Abstract class for plotting a dataset.
class gemseo.post.dataset.dataset_plot.DatasetPlot(dataset)[source]

Abstract class for plotting a dataset.

dataset

The dataset to be plotted.

Type

Dataset

Initialize self. See help(type(self)) for accurate signature.

Parameters

dataset (Dataset) – The dataset containing the data to plot.

Raises

ValueError – If the dataset is empty.

Return type

None

Attributes:

 color The color of the series. colormap The color map. figsize The figure size. figsize_x The x-component of figure size. figsize_y The y-component of figure size. font_size The font size. legend_location The location of the legend. linestyle The line style of the series. output_files The paths to the output files. rmax The maximum value on the r-axis. rmin The minimum value on the r-axis. title The title of the plot. xlabel The label for the x-axis. xmax The maximum value on the x-axis. xmin The minimum value on the x-axis. ylabel The label for the y-axis. ymax The maximum value on the y-axis. ymin The minimum value on the y-axis. zlabel The label for the z-axis. zmax The maximum value on the z-axis. zmin The minimum value on the z-axis.

Methods:

 execute([save, show, file_path, ...]) Execute the post processing.
property color

The color of the series.

property colormap

The color map.

execute(save=True, show=False, file_path=None, directory_path=None, file_name=None, file_format=None, properties=None, **plot_options)[source]

Execute the post processing.

Parameters
• save (bool) –

If True, save the plot.

By default it is set to True.

• show (bool) –

If True, display the plot.

By default it is set to False.

• file_path (Optional[Union[str, pathlib.Path]]) –

The path of the file to save the figures. If None, create a file path from directory_path, file_name and file_format.

By default it is set to None.

• directory_path (Optional[Union[str, pathlib.Path]]) –

The path of the directory to save the figures. If None, use the current working directory.

By default it is set to None.

• file_name (Optional[str]) –

The name of the file to save the figures. If None, use a default one generated by the post-processing.

By default it is set to None.

• file_format (Optional[str]) –

A file format, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

By default it is set to None.

• properties (Optional[Mapping[str, Union[str, int, float, Sequence[Union[str, int, float]]]]]) –

The general properties of a DatasetPlot.

By default it is set to None.

• **plot_options (Union[str, int, float, bool, Sequence[str]]) – The options of the current class inheriting from DatasetPlot.

Returns

The figures.

Return type

List[matplotlib.figure.Figure]

property figsize

The figure size.

property figsize_x

The x-component of figure size.

property figsize_y

The y-component of figure size.

property font_size

The font size.

property legend_location

The location of the legend.

property linestyle

The line style of the series.

property output_files

The paths to the output files.

property rmax

The maximum value on the r-axis.

property rmin

The minimum value on the r-axis.

property title

The title of the plot.

property xlabel

The label for the x-axis.

property xmax

The maximum value on the x-axis.

property xmin

The minimum value on the x-axis.

property ylabel

The label for the y-axis.

property ymax

The maximum value on the y-axis.

property ymin

The minimum value on the y-axis.

property zlabel

The label for the z-axis.

property zmax

The maximum value on the z-axis.

property zmin

The minimum value on the z-axis.

Draw Andrews curves from a Dataset.

The AndrewsCurves class implements the Andrew plot, a.k.a. Andrews curves, which is a way to visualize $$n$$ samples of a high-dimensional vector

$x=(x_1,x_2,\ldots,x_d)\in\mathbb{R}^d$

in a 2D referential by projecting each sample

$x^{(i)}=(x_1^{(i)},x_2^{(i)},\ldots,x_d^{(i)})$

onto the vector

$\left(\frac{1}{\sqrt{2}},\sin(t),\cos(t),\sin(2t),\cos(2t), \ldots\right)$

which is composed of the $$d$$ first elements of the Fourier series:

$f_i(t)=\left(\frac{x_1^{(i)}}{\sqrt{2}},x_2^{(i)}\sin(t),x_3^{(i)}\cos(t), x_4^{(i)}\sin(2t),x_5^{(i)}\cos(2t),\ldots\right)$

Each curve $$t\mapsto f_i(t)$$ is plotted over the interval $$[-\pi,\pi]$$ and structure in the data may be visible in these $$n$$ Andrews curves.

A variable name can be passed to the DatasetPlot.execute() method by means of the classifier keyword in order to color the curves according to the value of the variable name. This is useful when the data is labeled.

Classes:

 AndrewsCurves(dataset) Andrews curves.
class gemseo.post.dataset.andrews_curves.AndrewsCurves(dataset)[source]

Andrews curves.

dataset

The dataset to be plotted.

Type

Dataset

Initialize self. See help(type(self)) for accurate signature.

Parameters

dataset (Dataset) – The dataset containing the data to plot.

Raises

ValueError – If the dataset is empty.

Return type

None

Attributes:

 color The color of the series. colormap The color map. figsize The figure size. figsize_x The x-component of figure size. figsize_y The y-component of figure size. font_size The font size. legend_location The location of the legend. linestyle The line style of the series. output_files The paths to the output files. rmax The maximum value on the r-axis. rmin The minimum value on the r-axis. title The title of the plot. xlabel The label for the x-axis. xmax The maximum value on the x-axis. xmin The minimum value on the x-axis. ylabel The label for the y-axis. ymax The maximum value on the y-axis. ymin The minimum value on the y-axis. zlabel The label for the z-axis. zmax The maximum value on the z-axis. zmin The minimum value on the z-axis.

Methods:

 execute([save, show, file_path, ...]) Execute the post processing.
property color

The color of the series.

property colormap

The color map.

execute(save=True, show=False, file_path=None, directory_path=None, file_name=None, file_format=None, properties=None, **plot_options)

Execute the post processing.

Parameters
• save (bool) –

If True, save the plot.

By default it is set to True.

• show (bool) –

If True, display the plot.

By default it is set to False.

• file_path (Optional[Union[str, pathlib.Path]]) –

The path of the file to save the figures. If None, create a file path from directory_path, file_name and file_format.

By default it is set to None.

• directory_path (Optional[Union[str, pathlib.Path]]) –

The path of the directory to save the figures. If None, use the current working directory.

By default it is set to None.

• file_name (Optional[str]) –

The name of the file to save the figures. If None, use a default one generated by the post-processing.

By default it is set to None.

• file_format (Optional[str]) –

A file format, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

By default it is set to None.

• properties (Optional[Mapping[str, Union[str, int, float, Sequence[Union[str, int, float]]]]]) –

The general properties of a DatasetPlot.

By default it is set to None.

• **plot_options (Union[str, int, float, bool, Sequence[str]]) – The options of the current class inheriting from DatasetPlot.

Returns

The figures.

Return type

List[matplotlib.figure.Figure]

property figsize

The figure size.

property figsize_x

The x-component of figure size.

property figsize_y

The y-component of figure size.

property font_size

The font size.

property legend_location

The location of the legend.

property linestyle

The line style of the series.

property output_files

The paths to the output files.

property rmax

The maximum value on the r-axis.

property rmin

The minimum value on the r-axis.

property title

The title of the plot.

property xlabel

The label for the x-axis.

property xmax

The maximum value on the x-axis.

property xmin

The minimum value on the x-axis.

property ylabel

The label for the y-axis.

property ymax

The maximum value on the y-axis.

property ymin

The minimum value on the y-axis.

property zlabel

The label for the z-axis.

property zmax

The maximum value on the z-axis.

property zmin

The minimum value on the z-axis.

Draw curves from a Dataset.

A Curves plot represents samples of a functional variable $$y(x)$$ discretized over a 1D mesh. Both evaluations of $$y$$ and mesh are stored in a Dataset, $$y$$ as a parameter and the mesh as a metadata.

Classes:

 Curves(dataset) Plot curves y_i over the mesh x.
class gemseo.post.dataset.curves.Curves(dataset)[source]

Plot curves y_i over the mesh x.

dataset

The dataset to be plotted.

Type

Dataset

Initialize self. See help(type(self)) for accurate signature.

Parameters

dataset (Dataset) – The dataset containing the data to plot.

Raises

ValueError – If the dataset is empty.

Return type

None

Attributes:

 color The color of the series. colormap The color map. figsize The figure size. figsize_x The x-component of figure size. figsize_y The y-component of figure size. font_size The font size. legend_location The location of the legend. linestyle The line style of the series. output_files The paths to the output files. rmax The maximum value on the r-axis. rmin The minimum value on the r-axis. title The title of the plot. xlabel The label for the x-axis. xmax The maximum value on the x-axis. xmin The minimum value on the x-axis. ylabel The label for the y-axis. ymax The maximum value on the y-axis. ymin The minimum value on the y-axis. zlabel The label for the z-axis. zmax The maximum value on the z-axis. zmin The minimum value on the z-axis.

Methods:

 execute([save, show, file_path, ...]) Execute the post processing.
property color

The color of the series.

property colormap

The color map.

execute(save=True, show=False, file_path=None, directory_path=None, file_name=None, file_format=None, properties=None, **plot_options)

Execute the post processing.

Parameters
• save (bool) –

If True, save the plot.

By default it is set to True.

• show (bool) –

If True, display the plot.

By default it is set to False.

• file_path (Optional[Union[str, pathlib.Path]]) –

The path of the file to save the figures. If None, create a file path from directory_path, file_name and file_format.

By default it is set to None.

• directory_path (Optional[Union[str, pathlib.Path]]) –

The path of the directory to save the figures. If None, use the current working directory.

By default it is set to None.

• file_name (Optional[str]) –

The name of the file to save the figures. If None, use a default one generated by the post-processing.

By default it is set to None.

• file_format (Optional[str]) –

A file format, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

By default it is set to None.

• properties (Optional[Mapping[str, Union[str, int, float, Sequence[Union[str, int, float]]]]]) –

The general properties of a DatasetPlot.

By default it is set to None.

• **plot_options (Union[str, int, float, bool, Sequence[str]]) – The options of the current class inheriting from DatasetPlot.

Returns

The figures.

Return type

List[matplotlib.figure.Figure]

property figsize

The figure size.

property figsize_x

The x-component of figure size.

property figsize_y

The y-component of figure size.

property font_size

The font size.

property legend_location

The location of the legend.

property linestyle

The line style of the series.

property output_files

The paths to the output files.

property rmax

The maximum value on the r-axis.

property rmin

The minimum value on the r-axis.

property title

The title of the plot.

property xlabel

The label for the x-axis.

property xmax

The maximum value on the x-axis.

property xmin

The minimum value on the x-axis.

property ylabel

The label for the y-axis.

property ymax

The maximum value on the y-axis.

property ymin

The minimum value on the y-axis.

property zlabel

The label for the z-axis.

property zmax

The maximum value on the z-axis.

property zmin

The minimum value on the z-axis.

Draw parallel coordinates from a Dataset.

The ParallelCoordinates class implements the parallel coordinates plot, a.k.a. cowebplot, which is a way to visualize $$n$$ samples of a high-dimensional vector

$x=(x_1,x_2,\ldots,x_d)\in\mathbb{R}^d$

in a 2D referential by representing each sample

$x^{(i)}=(x_1^{(i)},x_2^{(i)},\ldots,x_d^{(i)})$

as a piece-wise line where the x-values of the nodes from left to right are the values of $$x_1$$, $$x_2$$, … and $$x_d^{(i)}$$.

A variable name is required by the DatasetPlot.execute() method by means of the classifier keyword in order to color the curves according to the value of the variable name. This is useful when the data is labeled or when we are looking for the samples for which the classifier value is comprised in some interval specified by the lower and upper arguments (default values are set to -inf and inf respectively). In the latter case, the color scale is composed of only two values: one for the samples positively classified and one for the others.

Classes:

 ParallelCoordinates(dataset) Parallel coordinates.
class gemseo.post.dataset.parallel_coordinates.ParallelCoordinates(dataset)[source]

Parallel coordinates.

dataset

The dataset to be plotted.

Type

Dataset

Initialize self. See help(type(self)) for accurate signature.

Parameters

dataset (Dataset) – The dataset containing the data to plot.

Raises

ValueError – If the dataset is empty.

Return type

None

Attributes:

 color The color of the series. colormap The color map. figsize The figure size. figsize_x The x-component of figure size. figsize_y The y-component of figure size. font_size The font size. legend_location The location of the legend. linestyle The line style of the series. output_files The paths to the output files. rmax The maximum value on the r-axis. rmin The minimum value on the r-axis. title The title of the plot. xlabel The label for the x-axis. xmax The maximum value on the x-axis. xmin The minimum value on the x-axis. ylabel The label for the y-axis. ymax The maximum value on the y-axis. ymin The minimum value on the y-axis. zlabel The label for the z-axis. zmax The maximum value on the z-axis. zmin The minimum value on the z-axis.

Methods:

 execute([save, show, file_path, ...]) Execute the post processing.
property color

The color of the series.

property colormap

The color map.

execute(save=True, show=False, file_path=None, directory_path=None, file_name=None, file_format=None, properties=None, **plot_options)

Execute the post processing.

Parameters
• save (bool) –

If True, save the plot.

By default it is set to True.

• show (bool) –

If True, display the plot.

By default it is set to False.

• file_path (Optional[Union[str, pathlib.Path]]) –

The path of the file to save the figures. If None, create a file path from directory_path, file_name and file_format.

By default it is set to None.

• directory_path (Optional[Union[str, pathlib.Path]]) –

The path of the directory to save the figures. If None, use the current working directory.

By default it is set to None.

• file_name (Optional[str]) –

The name of the file to save the figures. If None, use a default one generated by the post-processing.

By default it is set to None.

• file_format (Optional[str]) –

A file format, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

By default it is set to None.

• properties (Optional[Mapping[str, Union[str, int, float, Sequence[Union[str, int, float]]]]]) –

The general properties of a DatasetPlot.

By default it is set to None.

• **plot_options (Union[str, int, float, bool, Sequence[str]]) – The options of the current class inheriting from DatasetPlot.

Returns

The figures.

Return type

List[matplotlib.figure.Figure]

property figsize

The figure size.

property figsize_x

The x-component of figure size.

property figsize_y

The y-component of figure size.

property font_size

The font size.

property legend_location

The location of the legend.

property linestyle

The line style of the series.

property output_files

The paths to the output files.

property rmax

The maximum value on the r-axis.

property rmin

The minimum value on the r-axis.

property title

The title of the plot.

property xlabel

The label for the x-axis.

property xmax

The maximum value on the x-axis.

property xmin

The minimum value on the x-axis.

property ylabel

The label for the y-axis.

property ymax

The maximum value on the y-axis.

property ymin

The minimum value on the y-axis.

property zlabel

The label for the z-axis.

property zmax

The maximum value on the z-axis.

property zmin

The minimum value on the z-axis.

Draw a radar visualization from a Dataset.

The Radar class implements the Radviz plot, which is a way to visualize $$n$$ samples of a multi-dimensional vector

$x=(x_1,x_2,\ldots,x_d)\in\mathbb{R}^d$

in a 2D referential and to highlight the separability of the data.

For that, each sample

$x^{(i)}=(x_1^{(i)},x_2^{(i)},\ldots,x_d^{(i)})$

is rendered inside the unit disc with the influences of the different parameters evenly distributed on its circumference. Each parameter influence varies from 0 to 1 and can be interpreted compared to the others.

A variable name is required by the DatasetPlot.execute() method by means of the classifier keyword in order to color the curves according to the value of the variable name. This is useful when the data is labeled or when we are looking for the samples for which the classifier value is comprised in some interval specified by the lower and upper arguments (default values are set to -inf and inf respectively). In the latter case, the color scale is composed of only two values: one for the samples positively classified and one for the others.

Classes:

dataset

The dataset to be plotted.

Type

Dataset

Initialize self. See help(type(self)) for accurate signature.

Parameters

dataset (Dataset) – The dataset containing the data to plot.

Raises

ValueError – If the dataset is empty.

Return type

None

Attributes:

 color The color of the series. colormap The color map. figsize The figure size. figsize_x The x-component of figure size. figsize_y The y-component of figure size. font_size The font size. legend_location The location of the legend. linestyle The line style of the series. output_files The paths to the output files. rmax The maximum value on the r-axis. rmin The minimum value on the r-axis. title The title of the plot. xlabel The label for the x-axis. xmax The maximum value on the x-axis. xmin The minimum value on the x-axis. ylabel The label for the y-axis. ymax The maximum value on the y-axis. ymin The minimum value on the y-axis. zlabel The label for the z-axis. zmax The maximum value on the z-axis. zmin The minimum value on the z-axis.

Methods:

 execute([save, show, file_path, ...]) Execute the post processing.
property color

The color of the series.

property colormap

The color map.

execute(save=True, show=False, file_path=None, directory_path=None, file_name=None, file_format=None, properties=None, **plot_options)

Execute the post processing.

Parameters
• save (bool) –

If True, save the plot.

By default it is set to True.

• show (bool) –

If True, display the plot.

By default it is set to False.

• file_path (Optional[Union[str, pathlib.Path]]) –

The path of the file to save the figures. If None, create a file path from directory_path, file_name and file_format.

By default it is set to None.

• directory_path (Optional[Union[str, pathlib.Path]]) –

The path of the directory to save the figures. If None, use the current working directory.

By default it is set to None.

• file_name (Optional[str]) –

The name of the file to save the figures. If None, use a default one generated by the post-processing.

By default it is set to None.

• file_format (Optional[str]) –

A file format, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

By default it is set to None.

• properties (Optional[Mapping[str, Union[str, int, float, Sequence[Union[str, int, float]]]]]) –

The general properties of a DatasetPlot.

By default it is set to None.

• **plot_options (Union[str, int, float, bool, Sequence[str]]) – The options of the current class inheriting from DatasetPlot.

Returns

The figures.

Return type

List[matplotlib.figure.Figure]

property figsize

The figure size.

property figsize_x

The x-component of figure size.

property figsize_y

The y-component of figure size.

property font_size

The font size.

property legend_location

The location of the legend.

property linestyle

The line style of the series.

property output_files

The paths to the output files.

property rmax

The maximum value on the r-axis.

property rmin

The minimum value on the r-axis.

property title

The title of the plot.

property xlabel

The label for the x-axis.

property xmax

The maximum value on the x-axis.

property xmin

The minimum value on the x-axis.

property ylabel

The label for the y-axis.

property ymax

The maximum value on the y-axis.

property ymin

The minimum value on the y-axis.

property zlabel

The label for the z-axis.

property zmax

The maximum value on the z-axis.

property zmin

The minimum value on the z-axis.

Draw a scatter matrix from a Dataset.

The ScatterMatrix class implements the scatter plot matrix, which is a way to visualize $$n$$ samples of a multi-dimensional vector

$x=(x_1,x_2,\ldots,x_d)\in\mathbb{R}^d$

in several 2D subplots where the (i,j) subplot represents the cloud of points

$\left(x_i^{(k)},x_j^{(k)}\right)_{1\leq k \leq n}$

while the (i,i) subplot represents the empirical distribution of the samples

$x_i^{(1)},\ldots,x_i^{(n)}$

by means of an histogram or a kernel density estimator.

A variable name can be passed to the DatasetPlot.execute() method by means of the classifier keyword in order to color the curves according to the value of the variable name. This is useful when the data is labeled.

Classes:

 ScatterMatrix(dataset) Scatter plot matrix.
class gemseo.post.dataset.scatter_plot_matrix.ScatterMatrix(dataset)[source]

Scatter plot matrix.

dataset

The dataset to be plotted.

Type

Dataset

Initialize self. See help(type(self)) for accurate signature.

Parameters

dataset (Dataset) – The dataset containing the data to plot.

Raises

ValueError – If the dataset is empty.

Return type

None

Attributes:

 color The color of the series. colormap The color map. figsize The figure size. figsize_x The x-component of figure size. figsize_y The y-component of figure size. font_size The font size. legend_location The location of the legend. linestyle The line style of the series. output_files The paths to the output files. rmax The maximum value on the r-axis. rmin The minimum value on the r-axis. title The title of the plot. xlabel The label for the x-axis. xmax The maximum value on the x-axis. xmin The minimum value on the x-axis. ylabel The label for the y-axis. ymax The maximum value on the y-axis. ymin The minimum value on the y-axis. zlabel The label for the z-axis. zmax The maximum value on the z-axis. zmin The minimum value on the z-axis.

Methods:

 execute([save, show, file_path, ...]) Execute the post processing.
property color

The color of the series.

property colormap

The color map.

execute(save=True, show=False, file_path=None, directory_path=None, file_name=None, file_format=None, properties=None, **plot_options)

Execute the post processing.

Parameters
• save (bool) –

If True, save the plot.

By default it is set to True.

• show (bool) –

If True, display the plot.

By default it is set to False.

• file_path (Optional[Union[str, pathlib.Path]]) –

The path of the file to save the figures. If None, create a file path from directory_path, file_name and file_format.

By default it is set to None.

• directory_path (Optional[Union[str, pathlib.Path]]) –

The path of the directory to save the figures. If None, use the current working directory.

By default it is set to None.

• file_name (Optional[str]) –

The name of the file to save the figures. If None, use a default one generated by the post-processing.

By default it is set to None.

• file_format (Optional[str]) –

A file format, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

By default it is set to None.

• properties (Optional[Mapping[str, Union[str, int, float, Sequence[Union[str, int, float]]]]]) –

The general properties of a DatasetPlot.

By default it is set to None.

• **plot_options (Union[str, int, float, bool, Sequence[str]]) – The options of the current class inheriting from DatasetPlot.

Returns

The figures.

Return type

List[matplotlib.figure.Figure]

property figsize

The figure size.

property figsize_x

The x-component of figure size.

property figsize_y

The y-component of figure size.

property font_size

The font size.

property legend_location

The location of the legend.

property linestyle

The line style of the series.

property output_files

The paths to the output files.

property rmax

The maximum value on the r-axis.

property rmin

The minimum value on the r-axis.

property title

The title of the plot.

property xlabel

The label for the x-axis.

property xmax

The maximum value on the x-axis.

property xmin

The minimum value on the x-axis.

property ylabel

The label for the y-axis.

property ymax

The maximum value on the y-axis.

property ymin

The minimum value on the y-axis.

property zlabel

The label for the z-axis.

property zmax

The maximum value on the z-axis.

property zmin

The minimum value on the z-axis.

Draw a scatter plot from a Dataset.

A Scatter plot represents a set of points $$\{x_i,y_i\}_{1\leq i \leq n}$$ as markers on a classical plot where the color of points can be heterogeneous.

Classes:

 Scatter(dataset) Plot curve y versus x.
class gemseo.post.dataset.scatter.Scatter(dataset)[source]

Plot curve y versus x.

dataset

The dataset to be plotted.

Type

Dataset

Initialize self. See help(type(self)) for accurate signature.

Parameters

dataset (Dataset) – The dataset containing the data to plot.

Raises

ValueError – If the dataset is empty.

Return type

None

Attributes:

 color The color of the series. colormap The color map. figsize The figure size. figsize_x The x-component of figure size. figsize_y The y-component of figure size. font_size The font size. legend_location The location of the legend. linestyle The line style of the series. output_files The paths to the output files. rmax The maximum value on the r-axis. rmin The minimum value on the r-axis. title The title of the plot. xlabel The label for the x-axis. xmax The maximum value on the x-axis. xmin The minimum value on the x-axis. ylabel The label for the y-axis. ymax The maximum value on the y-axis. ymin The minimum value on the y-axis. zlabel The label for the z-axis. zmax The maximum value on the z-axis. zmin The minimum value on the z-axis.

Methods:

 execute([save, show, file_path, ...]) Execute the post processing.
property color

The color of the series.

property colormap

The color map.

execute(save=True, show=False, file_path=None, directory_path=None, file_name=None, file_format=None, properties=None, **plot_options)

Execute the post processing.

Parameters
• save (bool) –

If True, save the plot.

By default it is set to True.

• show (bool) –

If True, display the plot.

By default it is set to False.

• file_path (Optional[Union[str, pathlib.Path]]) –

The path of the file to save the figures. If None, create a file path from directory_path, file_name and file_format.

By default it is set to None.

• directory_path (Optional[Union[str, pathlib.Path]]) –

The path of the directory to save the figures. If None, use the current working directory.

By default it is set to None.

• file_name (Optional[str]) –

The name of the file to save the figures. If None, use a default one generated by the post-processing.

By default it is set to None.

• file_format (Optional[str]) –

A file format, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

By default it is set to None.

• properties (Optional[Mapping[str, Union[str, int, float, Sequence[Union[str, int, float]]]]]) –

The general properties of a DatasetPlot.

By default it is set to None.

• **plot_options (Union[str, int, float, bool, Sequence[str]]) – The options of the current class inheriting from DatasetPlot.

Returns

The figures.

Return type

List[matplotlib.figure.Figure]

property figsize

The figure size.

property figsize_x

The x-component of figure size.

property figsize_y

The y-component of figure size.

property font_size

The font size.

property legend_location

The location of the legend.

property linestyle

The line style of the series.

property output_files

The paths to the output files.

property rmax

The maximum value on the r-axis.

property rmin

The minimum value on the r-axis.

property title

The title of the plot.

property xlabel

The label for the x-axis.

property xmax

The maximum value on the x-axis.

property xmin

The minimum value on the x-axis.

property ylabel

The label for the y-axis.

property ymax

The maximum value on the y-axis.

property ymin

The minimum value on the y-axis.

property zlabel

The label for the z-axis.

property zmax

The maximum value on the z-axis.

property zmin

The minimum value on the z-axis.

Draw surfaces from a Dataset.

A Surfaces plot represents samples of a functional variable $$z(x,y)$$ discretized over a 2D mesh. Both evaluations of $$z$$ and mesh are stored in a Dataset, $$z$$ as a parameter and the mesh as a metadata.

Classes:

 Surfaces(dataset) Plot surfaces y_i over the mesh x.
class gemseo.post.dataset.surfaces.Surfaces(dataset)[source]

Plot surfaces y_i over the mesh x.

dataset

The dataset to be plotted.

Type

Dataset

Initialize self. See help(type(self)) for accurate signature.

Parameters

dataset (Dataset) – The dataset containing the data to plot.

Raises

ValueError – If the dataset is empty.

Return type

None

Attributes:

 color The color of the series. colormap The color map. figsize The figure size. figsize_x The x-component of figure size. figsize_y The y-component of figure size. font_size The font size. legend_location The location of the legend. linestyle The line style of the series. output_files The paths to the output files. rmax The maximum value on the r-axis. rmin The minimum value on the r-axis. title The title of the plot. xlabel The label for the x-axis. xmax The maximum value on the x-axis. xmin The minimum value on the x-axis. ylabel The label for the y-axis. ymax The maximum value on the y-axis. ymin The minimum value on the y-axis. zlabel The label for the z-axis. zmax The maximum value on the z-axis. zmin The minimum value on the z-axis.

Methods:

 execute([save, show, file_path, ...]) Execute the post processing.
property color

The color of the series.

property colormap

The color map.

execute(save=True, show=False, file_path=None, directory_path=None, file_name=None, file_format=None, properties=None, **plot_options)

Execute the post processing.

Parameters
• save (bool) –

If True, save the plot.

By default it is set to True.

• show (bool) –

If True, display the plot.

By default it is set to False.

• file_path (Optional[Union[str, pathlib.Path]]) –

The path of the file to save the figures. If None, create a file path from directory_path, file_name and file_format.

By default it is set to None.

• directory_path (Optional[Union[str, pathlib.Path]]) –

The path of the directory to save the figures. If None, use the current working directory.

By default it is set to None.

• file_name (Optional[str]) –

The name of the file to save the figures. If None, use a default one generated by the post-processing.

By default it is set to None.

• file_format (Optional[str]) –

A file format, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

By default it is set to None.

• properties (Optional[Mapping[str, Union[str, int, float, Sequence[Union[str, int, float]]]]]) –

The general properties of a DatasetPlot.

By default it is set to None.

• **plot_options (Union[str, int, float, bool, Sequence[str]]) – The options of the current class inheriting from DatasetPlot.

Returns

The figures.

Return type

List[matplotlib.figure.Figure]

property figsize

The figure size.

property figsize_x

The x-component of figure size.

property figsize_y

The y-component of figure size.

property font_size

The font size.

property legend_location

The location of the legend.

property linestyle

The line style of the series.

property output_files

The paths to the output files.

property rmax

The maximum value on the r-axis.

property rmin

The minimum value on the r-axis.

property title

The title of the plot.

property xlabel

The label for the x-axis.

property xmax

The maximum value on the x-axis.

property xmin

The minimum value on the x-axis.

property ylabel

The label for the y-axis.

property ymax

The maximum value on the y-axis.

property ymin

The minimum value on the y-axis.

property zlabel

The label for the z-axis.

property zmax

The maximum value on the z-axis.

property zmin

The minimum value on the z-axis.

Draw a variable versus another from a Dataset.

A YvsX plot represents samples of a couple $$(x,y)$$ as a set of points whose values are stored in a Dataset. The user can select the style of line or markers, as well as the color.

Classes:

 YvsX(dataset) Plot curve y versus x.
class gemseo.post.dataset.yvsx.YvsX(dataset)[source]

Plot curve y versus x.

dataset

The dataset to be plotted.

Type

Dataset

Initialize self. See help(type(self)) for accurate signature.

Parameters

dataset (Dataset) – The dataset containing the data to plot.

Raises

ValueError – If the dataset is empty.

Return type

None

Attributes:

 color The color of the series. colormap The color map. figsize The figure size. figsize_x The x-component of figure size. figsize_y The y-component of figure size. font_size The font size. legend_location The location of the legend. linestyle The line style of the series. output_files The paths to the output files. rmax The maximum value on the r-axis. rmin The minimum value on the r-axis. title The title of the plot. xlabel The label for the x-axis. xmax The maximum value on the x-axis. xmin The minimum value on the x-axis. ylabel The label for the y-axis. ymax The maximum value on the y-axis. ymin The minimum value on the y-axis. zlabel The label for the z-axis. zmax The maximum value on the z-axis. zmin The minimum value on the z-axis.

Methods:

 execute([save, show, file_path, ...]) Execute the post processing.
property color

The color of the series.

property colormap

The color map.

execute(save=True, show=False, file_path=None, directory_path=None, file_name=None, file_format=None, properties=None, **plot_options)

Execute the post processing.

Parameters
• save (bool) –

If True, save the plot.

By default it is set to True.

• show (bool) –

If True, display the plot.

By default it is set to False.

• file_path (Optional[Union[str, pathlib.Path]]) –

The path of the file to save the figures. If None, create a file path from directory_path, file_name and file_format.

By default it is set to None.

• directory_path (Optional[Union[str, pathlib.Path]]) –

The path of the directory to save the figures. If None, use the current working directory.

By default it is set to None.

• file_name (Optional[str]) –

The name of the file to save the figures. If None, use a default one generated by the post-processing.

By default it is set to None.

• file_format (Optional[str]) –

A file format, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

By default it is set to None.

• properties (Optional[Mapping[str, Union[str, int, float, Sequence[Union[str, int, float]]]]]) –

The general properties of a DatasetPlot.

By default it is set to None.

• **plot_options (Union[str, int, float, bool, Sequence[str]]) – The options of the current class inheriting from DatasetPlot.

Returns

The figures.

Return type

List[matplotlib.figure.Figure]

property figsize

The figure size.

property figsize_x

The x-component of figure size.

property figsize_y

The y-component of figure size.

property font_size

The font size.

property legend_location

The location of the legend.

property linestyle

The line style of the series.

property output_files

The paths to the output files.

property rmax

The maximum value on the r-axis.

property rmin

The minimum value on the r-axis.

property title

The title of the plot.

property xlabel

The label for the x-axis.

property xmax

The maximum value on the x-axis.

property xmin

The minimum value on the x-axis.

property ylabel

The label for the y-axis.

property ymax

The maximum value on the y-axis.

property ymin

The minimum value on the y-axis.

property zlabel

The label for the z-axis.

property zmax

The maximum value on the z-axis.

property zmin

The minimum value on the z-axis.

Draw a variable versus two others from a Dataset.

A ZvsXY plot represents the variable $$z$$ with respect to $$x$$ and $$y$$ as a surface plot, based on a set of points :points $$\{x_i,y_i,z_i\}_{1\leq i \leq n}$$. This interpolation is relies on the Delaunay triangulation of $$\{x_i,y_i\}_{1\leq i \leq n}$$

Classes:

 ZvsXY(dataset) Plot surface z versus x,y.
class gemseo.post.dataset.zvsxy.ZvsXY(dataset)[source]

Plot surface z versus x,y.

dataset

The dataset to be plotted.

Type

Dataset

Initialize self. See help(type(self)) for accurate signature.

Parameters

dataset (Dataset) – The dataset containing the data to plot.

Raises

ValueError – If the dataset is empty.

Return type

None

Attributes:

 color The color of the series. colormap The color map. figsize The figure size. figsize_x The x-component of figure size. figsize_y The y-component of figure size. font_size The font size. legend_location The location of the legend. linestyle The line style of the series. output_files The paths to the output files. rmax The maximum value on the r-axis. rmin The minimum value on the r-axis. title The title of the plot. xlabel The label for the x-axis. xmax The maximum value on the x-axis. xmin The minimum value on the x-axis. ylabel The label for the y-axis. ymax The maximum value on the y-axis. ymin The minimum value on the y-axis. zlabel The label for the z-axis. zmax The maximum value on the z-axis. zmin The minimum value on the z-axis.

Methods:

 execute([save, show, file_path, ...]) Execute the post processing.
property color

The color of the series.

property colormap

The color map.

execute(save=True, show=False, file_path=None, directory_path=None, file_name=None, file_format=None, properties=None, **plot_options)

Execute the post processing.

Parameters
• save (bool) –

If True, save the plot.

By default it is set to True.

• show (bool) –

If True, display the plot.

By default it is set to False.

• file_path (Optional[Union[str, pathlib.Path]]) –

The path of the file to save the figures. If None, create a file path from directory_path, file_name and file_format.

By default it is set to None.

• directory_path (Optional[Union[str, pathlib.Path]]) –

The path of the directory to save the figures. If None, use the current working directory.

By default it is set to None.

• file_name (Optional[str]) –

The name of the file to save the figures. If None, use a default one generated by the post-processing.

By default it is set to None.

• file_format (Optional[str]) –

A file format, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use a default file extension.

By default it is set to None.

• properties (Optional[Mapping[str, Union[str, int, float, Sequence[Union[str, int, float]]]]]) –

The general properties of a DatasetPlot.

By default it is set to None.

• **plot_options (Union[str, int, float, bool, Sequence[str]]) – The options of the current class inheriting from DatasetPlot.

Returns

The figures.

Return type

List[matplotlib.figure.Figure]

property figsize

The figure size.

property figsize_x

The x-component of figure size.

property figsize_y

The y-component of figure size.

property font_size

The font size.

property legend_location

The location of the legend.

property linestyle

The line style of the series.

property output_files

The paths to the output files.

property rmax

The maximum value on the r-axis.

property rmin

The minimum value on the r-axis.

property title

The title of the plot.

property xlabel

The label for the x-axis.

property xmax

The maximum value on the x-axis.

property xmin

The minimum value on the x-axis.

property ylabel

The label for the y-axis.

property ymax

The maximum value on the y-axis.

property ymin

The minimum value on the y-axis.

property zlabel

The label for the z-axis.

property zmax

The maximum value on the z-axis.

property zmin

The minimum value on the z-axis.