sofirpy.simulation.plot module

This module provides a easy function for plotting the simulation results.

sofirpy.simulation.plot.plot_results(results: pd.DataFrame, x_name: str, y_name: str | list[str], x_label: str | None = None, y_label: str | None = None, title: str | None = None, legend: str | list[str] | None = None, style_sheet_path: str | Path | None = None) tuple[matplotlib.axes.Axes, matplotlib.figure.Figure][source]

Plot the simulation results.

Parameters:
  • results (pd.DataFrame) – Simulation results.

  • x_name (str) – Name of data that should be on the x-axis.

  • y_name (str | list[str]) – Name of data that should be on the y-axis. For multiple plots, give a list with names as the argument.

  • x_label (str, optional) – X-label for the plot. Defaults to None.

  • y_label (str, optional) – Y-label for the plot. Defaults to None.

  • title (str, optional) – Title for the plot. Defaults to None.

  • legend (str | list[str] | None, optional) – Legend for the plot. For multiple plots give a list of strings as the argument. Defaults to None.

  • style_sheet_path (str | Path | None, optional) – Path to a matplotlib style sheet. Defaults to None.

Returns:

Matplotlib Axes and figure object.

Return type:

tuple[Axes, Figure]