environmentaltools.graphics.crosscorr
- environmentaltools.graphics.crosscorr(xy, xys, variable, lags=48, fname=None)[source]
Plot cross-correlation between observed and simulated variables.
Displays the cross-correlation function comparing two time series to assess temporal relationships and model performance.
- Parameters:
xy (tuple) – Tuple of two arrays (x, y) for observed data.
xys (tuple) – Tuple of two arrays (x, y) for simulated data.
variable (str) – Name of variable for plot labeling.
lags (int) – Maximum lag time in hours. Defaults to 48.
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
Cross-correlation is normalized by standard deviations and means.