The default behavior for adding and solving with noisemodels has changed from Pastas 1.5. Find more information here


Plotting.diagnostics(tmin=None, tmax=None, figsize=(10, 5), bins=50, acf_options=None, fig=None, alpha=0.05, **kwargs)[source]#

Plot a window that helps in diagnosing basic model assumptions.

  • tmin (str or pandas.Timestamp, optional) – start time for which to calculate the residuals.

  • tmax (str or pandas.Timestamp, optional) – end time for which to calculate the residuals.

  • figsize (tuple, optional) – Tuple with the height and width of the figure in inches.

  • bins (int optional) – number of bins used for the histogram. 50 is default.

  • acf_options (dict, optional) – dictionary with keyword arguments that are passed on to pastas.stats.acf.

  • fig (matplotlib.pyplot.Figure, optional) – Optionally provide a matplotlib.pyplot.Figure instance to plot onto.

  • alpha (float, optional) – Significance level to calculate the (1-alpha)-confidence intervals.

  • **kwargs (dict, optional) – Optional keyword arguments, passed on to matplotlib.pyplot.figure method.



Return type

list of matplotlib.axes.Axes


>>> axes = ml.plots.diagnostics()


This plot assumed that the noise or residuals follow a Normal distribution.

See also


Method that computes the autocorrelation.


Method use to plot the probability plot.