matplotlib.pyplot.xcorr(x, y, normed=True, detrend=<function detrend_none>, usevlines=True, maxlags=10, hold=None, data=None, **kwargs)¶Plot the cross correlation between x and y.
The correlation with lag k is defined as sum_n x[n+k] * conj(y[n]).
| Parameters: | x : sequence of scalars of length n y : sequence of scalars of length n hold : bool, optional, deprecated, default: True detrend : callable, optional, default:
normed : bool, optional, default: True
usevlines : bool, optional, default: True
maxlags : int, optional
|
|---|---|
| Returns: | lags : array (lenth
c : array (length
line :
b :
|
| Other Parameters: | |
linestyle :
marker : string, optional
|
|
Notes
The cross correlation is performed with numpy.correlate() with
mode = 2.
Note
In addition to the above described arguments, this function can take a data keyword argument. If such a data argument is given, the following arguments are replaced by data[<arg>]: