Logo Search packages:      
Sourcecode: matplotlib version File versions

date_demo.py

00001 """
Simple example showing how to plot a time series with datetime objects
"""
import datetime
import matplotlib.pyplot as plt

today = datetime.date.today()
dates = [today+datetime.timedelta(days=i) for i in range(10)]

fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(dates, range(10))
fig.autofmt_xdate()
plt.show()

Generated by  Doxygen 1.6.0   Back to index