gemseo / post / dataset

Show inherited members

curves module

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 misc.

class gemseo.post.dataset.curves.Curves(dataset, mesh, variable, samples=None)[source]

Bases: DatasetPlot

Plot curves y_i over the mesh x.

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

  • mesh (str) – The name of the dataset misc corresponding to the mesh.

  • variable (str) – The name of the variable for the x-axis.

  • samples (Sequence[int] | None) – The indices of the samples to plot. If None, plot all the samples.

Raises:

ValueError – If the dataset is empty.

Examples using Curves

Burgers dataset

Burgers dataset