Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 707b872

Browse files
committed
added htdocs to repository
svn path=/trunk/matplotlib/; revision=79
1 parent 06f748c commit 707b872

2 files changed

Lines changed: 37 additions & 8 deletions

File tree

TODO

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,14 @@
116116
-- DONE Fix legend bug on win32 and stock_demo. This appears to be GTK
117117
specific
118118

119-
-- ticks too short with log scaling
119+
-- DONE with log scaling ticks too short with log scaling
120120

121121
-- arbitrary patches for scatter
122122

123123
-- DONE zoom x and y controls in wrong direction. tick labels not updating
124124
with interactive zoom
125125

126-
-- add TM for matlab on website and in docs
126+
-- DONE 2003-11-20 - add TM for matlab on website and in docs
127127

128128
-- Why are the pcolor PS files so large (45MB!). How to do interp
129129
shapding with GTK. Look at the effect of linewidth on GTK plots --
@@ -133,15 +133,16 @@
133133
-- DONE 2003-11-02 - Do a nearest neighbor color pick on GD when
134134
allocate fails
135135

136-
-- make a nice errorbar and scatter screenshot
136+
-- DONE 2003-11-20 - make a nice errorbar and scatter screenshot
137137

138138
-- finish contour
139139

140140
-- allow rectangle select region for zoom tool
141141

142142
-- update Debian section on web page
143143

144-
-- auto line style cycling for multiple line types broken
144+
-- DONE 2003-11-20 - auto line style cycling for multiple line types
145+
broken
145146

146147
-- DONE 2003-11-18 (using inkrect) :logical rect too big on gtk backend
147148

@@ -150,5 +151,5 @@
150151

151152
-- DONE 2003-11-20 - port Gary's errorbar code to new API before 0.40
152153

153-
-- legend axes box doesn't resize on save in GTK backend -- see htdocs
154-
legend_demo.py
154+
-- DONE 2003-11-20 - problem with stale _set_font. legend axes box
155+
doesn't resize on save in GTK backend -- see htdocs legend_demo.py

examples/data_helper.py

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Some functions to load a return data for the plot demos
22

3-
from Numeric import fromstring, argsort, take
4-
import Numeric as numpy
3+
from Numeric import fromstring, argsort, take, array
54
def get_two_stock_data():
65
"""
76
load stock time and price data for two stocks The return values
@@ -20,3 +19,32 @@ def get_two_stock_data():
2019
d2, p2 = M2[:,0], M2[:,1]
2120
return (d1,p1,d2,p2)
2221

22+
23+
def get_daily_data():
24+
"""
25+
return stock1 and stock2 instances, each of which have attributes
26+
27+
open, high, low, close, volume
28+
29+
as numeric arrays
30+
31+
"""
32+
class C: pass
33+
34+
def get_ticker(ticker):
35+
vals = []
36+
lines = file( 'data/%s.csv' % ticker ).readlines()
37+
for line in lines[1:]:
38+
vals.append([float(val) for val in line.split(',')[1:]])
39+
40+
M = array(vals)
41+
c = C()
42+
c.open = M[:,0]
43+
c.high = M[:,1]
44+
c.low = M[:,2]
45+
c.close = M[:,3]
46+
c.volume = M[:,4]
47+
return c
48+
c1 = get_ticker('intc')
49+
c2 = get_ticker('msft')
50+
return c1, c2

0 commit comments

Comments
 (0)