statsmodels.graphics.tsaplots.month_plot(x, dates=None, ylabel=None, ax=None)
[source]
Seasonal plot of monthly data
Parameters: |
|
---|---|
Returns: | |
Return type: |
matplotlib.Figure |
>>> import statsmodels.api as sm >>> import pandas as pd
>>> dta = sm.datasets.elnino.load_pandas().data >>> dta['YEAR'] = dta.YEAR.astype(int).astype(str) >>> dta = dta.set_index('YEAR').T.unstack() >>> dates = pd.to_datetime(list(map(lambda x : '-'.join(x) + '-1', ... dta.index.values)))
>>> dta.index = pd.DatetimeIndex(dates, freq='MS') >>> fig = sm.graphics.tsa.month_plot(dta)
(Source code, png, hires.png, pdf)
© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.graphics.tsaplots.month_plot.html