Menu

[r4647]: / branches / transforms / examples / load_converter.py  Maximize  Restore  History

Download this file

15 lines (12 with data), 356 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
from matplotlib.dates import strpdate2num
from matplotlib.mlab import load
from pylab import figure, show
dates, closes = load(
'data/msft.csv', delimiter=',',
converters={0:strpdate2num('%d-%b-%y')},
skiprows=1, usecols=(0,2), unpack=True)
fig = figure()
ax = fig.add_subplot(111)
ax.plot_date(dates, closes, '-')
fig.autofmt_xdate()
show()
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.