A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pandas.pydata.org/pandas-docs/stable/reference/api/../api/pandas.plotting.lag_plot.html below:

pandas.plotting.lag_plot — pandas 2.3.1 documentation

pandas.plotting.lag_plot#
pandas.plotting.lag_plot(series, lag=1, ax=None, **kwds)[source]#

Lag plot for time series.

Parameters:
seriesSeries

The time series to visualize.

lagint, default 1

Lag length of the scatter plot.

axMatplotlib axis object, optional

The matplotlib axis object to use.

**kwds

Matplotlib scatter method keyword arguments.

Returns:
matplotlib.axes.Axes

Examples

Lag plots are most commonly used to look for patterns in time series data.

Given the following time series

>>> np.random.seed(5)
>>> x = np.cumsum(np.random.normal(loc=1, scale=5, size=50))
>>> s = pd.Series(x)
>>> s.plot()  

A lag plot with lag=1 returns

>>> pd.plotting.lag_plot(s, lag=1)
<Axes: xlabel='y(t)', ylabel='y(t + 1)'>

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4