Menu

[r7263]: / branches / mathtex / examples / pylab_examples / loadrec.py  Maximize  Restore  History

Download this file

17 lines (13 with data), 356 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from matplotlib import mlab
from pylab import figure, show
a = mlab.csv2rec('../data/msft.csv')
a.sort()
print a.dtype
fig = figure()
ax = fig.add_subplot(111)
ax.plot(a.date, a.adj_close, '-')
fig.autofmt_xdate()
# if you have xlwt installed, you can output excel
import mpl_toolkits.exceltools as exceltools
exceltools.rec2excel(a, 'test.xls')
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.