matplotlib 3.5.1

NotesOther ParametersParametersReturns
acorr(self, x, *, data=None, **kwargs)

Notes

The cross correlation is performed with numpy.correlate with mode = "full" .

Other Parameters

linestyle : `.Line2D` property, optional

The linestyle for plotting the data points. Only used if usevlines is False .

marker : str, default: 'o'

The marker for plotting the data points. Only used if usevlines is False .

data : indexable object, optional

If given, the following parameters also accept a string s , which is interpreted as data[s] (unless this raises an exception):

x

**kwargs :

Additional parameters are passed to .Axes.vlines and .Axes.axhline if usevlines is True ; otherwise they are passed to .Axes.plot .

Parameters

x : array-like
detrend : callable, default: `.mlab.detrend_none` (no detrending)

A detrending function applied to x. It must have the signature :

detrend(x: np.ndarray) -> np.ndarray
normed : bool, default: True

If True , input vectors are normalised to unit length.

usevlines : bool, default: True

Determines the plot style.

If True , vertical lines are plotted from 0 to the acorr value using .Axes.vlines . Additionally, a horizontal line is plotted at y=0 using .Axes.axhline .

If False , markers are plotted at the acorr values using .Axes.plot .

maxlags : int, default: 10

Number of lags to show. If None , will return all 2 * len(x) - 1 lags.

Returns

lags : array (length ``2*maxlags+1``)

The lag vector.

c : array (length ``2*maxlags+1``)

The auto correlation vector.

line : `.LineCollection` or `.Line2D`

.Artist added to the Axes of the correlation:

b : `.Line2D` or None

Horizontal line at 0 if usevlines is True None usevlines is False.

Plot the autocorrelation of x.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /matplotlib/axes/_axes.py#1867
type: <class 'function'>
Commit: