Menu

[r185]: / trunk / htdocs / examples / stock_demo.py  Maximize  Restore  History

Download this file

18 lines (14 with data), 388 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
import sys
from matplotlib.matlab import *
from data_helper import get_two_stock_data
import matplotlib.numerix as numpy
(d1, p1, d2, p2 ) = get_two_stock_data()
lines = plot(d1, p1, 'bs', d2, p2, 'go')
set(lines, 'data_clipping', True)
xlabel('Days')
ylabel('Normalized price')
set(gca(), 'xlim', [0, 3])
title('INTC vs AAPL')
legend( ('INTC', 'AAPL') )
#savefig('stock_demo')
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.