In [ ]:
import hvplot.pandas  # noqa
import numpy as np
import pandas as pd

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

Given the following time series:

In [ ]:
x = np.cumsum(np.random.normal(loc=1, scale=5, size=50))
s = pd.Series(x, name='Time series')


A lag plot with lag=1 returns:

In [ ]:
hvplot.plotting.lag_plot(s, lag=1)