pyramid.utils.autocorr_plot

pyramid.utils.autocorr_plot(series, show=True)[source][source]

Plot a series’ auto-correlation.

A wrapper method for the Pandas autocorrelation_plot method.

Parameters:

series : array-like, shape=(n_samples,)

The series or numpy array for which to plot an auto-correlation.

show : bool, optional (default=True)

Whether to show the plot after it’s been created. If not, will return the plot as an Axis object instead.

Returns:

res : Axis or None

If show is True, does not return anything. If False, returns the Axis object.

Notes

This method will only show the plot if show=True (which is the default behavior). To simply get the axis back (say, to add to another canvas), use show=False.

Examples

>>> autocorr_plot([1, 2, 3], False)  
<matplotlib.axes._subplots.AxesSubplot object at 0x127f41dd8>