Dear Users,
Is there any other method in matplotlib to get the plot similar to the one there in below link?
http://dsnra.jpl.nasa.gov/software/Python/scikits/lib.plotting.examples.html
I tried using this package but get below error.
sjo@…4372…/hourly_rama~$ python ts.py
Traceback (most recent call last):
File “ts.py”, line 12, in
fsp = fig.add_tsplot(111)
File “/usr/local/lib/python2.7/dist-packages/scikits.timeseries-0.91.3-py2.7-linux-x86_64.egg/scikits/timeseries/lib/plotlib.py”, line 1284, in add_tsplot
return add_generic_subplot(self, *args, **kwargs)
File
“/usr/local/lib/python2.7/dist-packages/scikits.timeseries-0.91.3-py2.7-linux-x86_64.egg/scikits/timeseries/lib/plotlib.py”, line 177, in add_generic_subplot
if key in figure_instance._seen:
AttributeError: ‘TimeSeriesFigure’ object has no attribute ‘_seen’
···
########################################
import numpy as np
import matplotlib.pyplot as plt
import scikits.timeseries as ts
import scikits.timeseries.lib.plotlib as tpl
from scikits.timeseries.lib.moving_funcs import mov_average_expw
generate some random data
data = np.cumprod(1 + np.random.normal(0, 1,
300)/100)
series = ts.time_series(data,
start_date=ts.Date(freq='M', year=1982, month=1))
fig = tpl.tsfigure()
fsp = fig.add_tsplot(111)
fsp.tsplot(series, ‘-’, mov_average_expw(series, 40), ‘r–’)
plt.show()
Sudheer Joseph
Indian National Centre for Ocean Information Services
Ministry of Earth Sciences, Govt. of India
POST BOX NO: 21, IDA Jeedeemetla P.O.
Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55
Tel:+91-40-23886047(O),Fax:+91-40-23895011(O),
Tel:+91-40-23044600®,Tel:+91-40-9440832534(Mobile)
E-mail:sjo.India@…287…;sudheer.joseph@…9…
Web- http://oppamthadathil.tripod.com