Skip to content

Commit ec4fa6f

Browse files
orbitfoldwesm
authored andcommitted
Added lag plot documentation
1 parent 09e6793 commit ec4fa6f

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

doc/source/visualization.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,3 +283,22 @@ of the same class will usually be closer together and form larger structures.
283283
284284
@savefig andrews_curves.png width=6in
285285
andrews_curves(data, 'Name')
286+
287+
Lag Plot
288+
~~~~~~~~
289+
290+
Lag plots are used to check if a data set or time series is random. Random
291+
data should not exhibit any structure in the lag plot. Non-random structure
292+
implies that the underlying data are not random.
293+
294+
.. ipython:: python
295+
296+
from pandas.tools.plotting import lag_plot
297+
298+
plt.figure()
299+
300+
data = Series(0.1 * np.random.random(1000) +
301+
0.9 * np.sin(np.linspace(-99 * np.pi, 99 * np.pi, num=1000)))
302+
303+
@savefig lag_plot.png width=6in
304+
lag_plot(data)

0 commit comments

Comments
 (0)