pyobsmod.Dataset.time_series_plot#

Dataset.time_series_plot(which_stats: Sequence[str] | dict[str, Any] | None = None, names: Sequence[str] | None = None, fmt: str | Sequence[str] = '.2f', ax: Axes | None = None, textbox_kws: dict[str, Any] | None = None, obs_kws: dict[str, Any] | None = None, mod_kws: dict[str, Any] | None = None, **kwargs) Axes#

Time series plot of observed data against modelled data.

Display selected statistics.

Parameters:
  • which_stats (Sequence[str] | dict[str, Any] | None) – Sequence of the statistics parameters to compute or alternatively a dictionary with the statistics parameters as keys and the arguments that are passed to the method as values.

  • names (Sequence[str] | None) – Sequence of the names of the statistics parameters. If None, the names are taken from the keys of the which_stats dictionary.

  • fmt (str | Sequence[str]) – Format string for the statistics. Can be a single string that is used for all statistics or a sequence of strings that is used for each statistic individually.

  • ax (matplotlib.pyplot.Axes | None) – Matplotlib axis to draw the plot on.

  • textbox_kws (dict[str, Any] | None) – Dictionary that is passed to matplotlib.offsetbox.AnchoredText.

  • obs_kws (dict[str, Any] | None) – Dictionary that is passed to the observation data matplotlib.pyplot.plot call.

  • mod_kws (dict[str, Any] | None) – Dictionary that is passed to the modelled data matplotlib.pyplot.plot call.

  • **kwargs – Additional arguments that are passed to both matplotlib.pyplot.plot calls.

Returns:

ax – The Matplotlib axes.

Return type:

matplotlib.pyplot.Axes

Examples

import matplotlib.pyplot as plt

from pyobsmod import load_dataset_example

ds = load_dataset_example()
ds.time_series_plot(['bias', 'rmse', 'nrmse', 'r2'])
plt.show()
../../_images/pyobsmod.Dataset.time_series_plot_0_0.png