environmentaltools.graphics.corr

environmentaltools.graphics.corr(data: DataFrame, lags: int = 24, ax=None, file_name: str = None)[source]

Plot autocorrelation function of time series.

Displays the normalized autocorrelation as a function of time lag to identify temporal dependencies and periodicity.

Parameters:
  • data (pd.DataFrame) – Time series data (single column or Series).

  • lags (int) – Maximum lag time in hours. Defaults to 24.

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

  • file_name (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