gemseo / post / dataset

Show inherited members

lines module

Connect the observations of variables stored in a Dataset with lines.

class gemseo.post.dataset.lines.Lines(dataset, variables=None, abscissa_variable=None, add_markers=False, set_xticks_from_data=False)[source]

Bases: DatasetPlot

Connect the observations of variables with lines.

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

  • variables (Sequence[str] | None) – The names of the variables to plot. If None, use all the variables.

  • abscissa_variable (str | None) – The name of the variable used in abscissa. The observations of the variables are plotted in function of the observations of this abscissa_variable. If None, the observations of the variables are plotted in function of the indices of the observations.

  • add_markers (bool) –

    Whether to mark the observations with dots.

    By default it is set to False.

  • set_xticks_from_data (bool) –

    Whether to use the values of abscissa_variable as locations of abscissa ticks.

    By default it is set to False.

Raises:

ValueError – If the dataset is empty.

color: str | list[str]

The color(s) for the series.

If empty, use a default one.

colormap: str

The color map.

dataset: Dataset

The dataset to be plotted.

fig_size: FigSizeType

The figure size.

font_size: int

The font size.

legend_location: str

The location of the legend.

linestyle: str | list[str]

The line style(s) for the series.

If empty, use a default one.

marker: str | list[str]

The marker(s) for the series.

If empty, use a default one.

title: str

The title of the plot.

xlabel: str

The label for the x-axis.

xmax: float | None

The maximum value on the x-axis.”.

If None, compute it from data.

xmin: float | None

The minimum value on the x-axis.

If None, compute it from data.

ylabel: str

The label for the y-axis.

ymax: float | None

The maximum value on the y-axis.

If None, compute it from data.

ymin: float | None

The minimum value on the y-axis.

If None, compute it from data.

zlabel: str

The label for the z-axis.

zmax: float | None

The maximum value on the z-axis.

If None, compute it from data.

zmin: float | None

The minimum value on the z-axis.

If None, compute it from data.

Examples using Lines

Lines

Lines