porereax.plot

Module for plotting sampled data.

The module provides functions to plot histograms, time series, and 2D density data from sampled data.

Functions

plot_data(link_data[, axis, identifiers, ...])

Plot sampled data from a data file.

porereax.plot.plot_data(link_data, axis=None, identifiers=None, colors=None, std=False, mean=False, density=False, dt=50, transpose=False, plot_kwargs_1d=None, plot_kwargs_2d=None)[source]

Plot sampled data from a data file. All types of samplers are supported. Depending on the sampler type and dimension, different types of plots will be generated.

Parameters:
  • link_data (str) – Path to the data file created by a sampler instance.

  • axis (Axes | None) – Axis to plot on. If None, a new figure and axis will be created (default is None).

  • identifiers (list | None) – List of identifiers to plot. If empty, all identifiers will be plotted (default is None).

  • colors (list[str] | None) – List of colors to use for plotting. If empty, default colors will be used (default is None).

  • std (bool) – Whether to plot standard deviation shading (default is False).

  • mean (bool) – Whether to plot mean values as vertical lines (default is False).

  • density (bool) – Whether to normalise histograms to density (default is False).

  • dt (int) – Time step in femtoseconds for time series plots (default is 50).

  • transpose (bool) – Whether to transpose the axes for 2D density plots (default is False).

  • plot_kwargs_1d (dict | None) – Additional keyword arguments for 1D plots (default is None).

  • plot_kwargs_2d (dict | None) – Additional keyword arguments for 2D plots (default is None).

Returns:

A tuple containing the figure and axis objects. If an axis was provided, the figure will be None.

Return type:

tuple[Figure | None, Axes]