environmentaltools.graphics.nonstationary_percentiles

environmentaltools.graphics.nonstationary_percentiles(data: DataFrame, variable: str, fun: str, pars=None, ax=None, fname=None)[source]

Plot monthly CDFs in normalized space.

Displays cumulative distribution functions for each month in normalized (Gaussian) space to assess seasonal nonstationarity in the distribution.

Parameters:
  • data (pd.DataFrame) – Time series with datetime index.

  • variable (str) – Name of the variable column to analyze.

  • fun (str) – Name of scipy.stats probability distribution (e.g., ‘norm’, ‘lognorm’, ‘genextreme’).

  • pars (tuple, optional) – Distribution parameters. If None, fits parameters to data. Defaults to None.

  • ax (matplotlib.axes.Axes, optional) – Axis for the plot. Creates new if None. Defaults to None.

  • fname (str, optional) – File path to save the plot. If None, displays interactively. Defaults to None.

Returns:

The axis with the plot.

Return type:

matplotlib.axes.Axes

Note

Each month is represented by a different color. Deviations from the 45° line indicate departures from the annual distribution.