8000 reorganized table · tacaswell/matplotlib@6cc5c32 · GitHub 8000
[go: up one dir, main page]

Skip to content

Commit 6cc5c32

Browse files
committed
reorganized table
svn path=/trunk/matplotlib/; revision=139
1 parent 48043bc commit 6cc5c32

File tree

11 files changed

+322
-79
lines changed

11 files changed

+322
-79
lines changed

KNOWN_BUGS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ KNOWN BUGS
2424

2525
- DONE parse error on lines like plot(bins, mu, bins, mu+sigma, '--')
2626

27-
- mri with eeg offsets whacked
27+
- DONE 2004-02-11 mri with eeg offsets whacked
2828

2929
GD
3030

Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# Copyright (C) 2003 <jdhunter@ace.bsd.uchicago.edu>
33
# $Header$
44
# $Log$
5+
# Revision 1.19 2004/02/11 19:16:01 jdh2358
6+
# reorganized table
7+
#
58
# Revision 1.18 2004/02/11 00:07:44 jdh2358
69
# relocated gtkgd ext mod
710
#
@@ -75,6 +78,7 @@ MODULES = \
7578
matplotlib.backends.backend_gd \
7679
matplotlib.backends.backend_gtk \
7780
matplotlib.backends.backend_gtkgd \
81+
matplotlib.backends.backend_paint \
7882
matplotlib.backends.backend_ps \
7983
matplotlib.backends.backend_template \
8084
matplotlib.backends.backend_wx \
@@ -98,17 +102,21 @@ clean:
98102
find examples \( -name "*.png" -o -name "*.ps" -o -name "*.jpg" -o -name "*.eps" \) | xargs rm -f
99103

100104
htmldocs:
105+
cp build/lib.linux-i686-2.3/matplotlib/backends/*.so matplotlib/backends/;\
101106
rm -rf htdocs/matplotlib;\
102107
cp -a matplotlib htdocs/;\
108+
rm htdocs/matplotlib/backends/*.so;\
103109
cp examples/*.py htdocs/examples;\
104-
cp API_CHANGES htdocs/
110+
cp API_CHANGES htdocs/;\
105111
rm -f docs/*.html;\
106112
${PYDOC} -w ${MODULES};\
107113
mv *.html docs/
108114
cd htdocs;\
109115
${PYTHON} process_docs.py;\
110116
${PYTHON} convert.py;\
111-
tar cfz site.tar.gz *.html screenshots tut examples gd API_CHANGES
117+
tar cfz site.tar.gz *.html screenshots tut examples gd API_CHANGES;\
118+
cd ..;\
119+
rm matplotlib/backends/*.so;\
112120

113121
release: ${DISTFILES}
114122
${PYTHON} license.py ${VERSION};\

TODO

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170

171171
-- DONE 2004-02-06 allow pass of file handle to backend_gd
172172

173-
-- check clipping for GD
173+
-- DONE check clipping for GD
174174

175175
-- Fix GD color allocation bug
176176

@@ -181,12 +181,8 @@
181181
-- Separate out the backend web pages and get developers to maintain
182182
them.
183183

184-
-- FAQ
184+
-- DONE FAQ
185185

186-
* numarray
187-
* pygtk path
188-
* what's up with show
189-
190-
-- explaing the new interactive syntax on
186+
-- DONE 2004-02-11 explaing the new interactive syntax on
191187
http://matplotlib.sourceforge.net/interactive.html
192188

examples/axes_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@
3737
set(a, 'xticks', [])
3838
set(a, 'yticks', [])
3939

40-
savefig('axes_demo', dpi=150)
40+
savefig('axes_demo', dpi=600)
4141
show()

examples/histogram_demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
# the histogram of the data
77
n, bins, patches = hist(x, 50, normed=1)
8+
89
# add a 'best fit' line
910
y = normpdf( bins, mu, sigma)
1011
l = plot(bins, y, 'r--')
11-
set(l, 'linewidth', 2)
12-
#set(gca(), 'xlim', [40, 160])
12+
set(l, 'linewidth', 1)
1313

1414
xlabel('Smarts')
1515
ylabel('Probability')

examples/mri_with_eeg.py

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# note, this is currentl *very slow*. I'm working on improving the
22
# efficiency of pcolor. If you want to run this example and your
33
# computer is not very fast, I suggest you grab a cup of coffee while
4-
# it runs
4+
# it runs. Look for major improvments in pcolor in future releases of
5+
# matplotlib when we add image handling capability in extension module
6 F438 +
# code
57

8+
from __future__ import division
69
from matplotlib.matlab import *
710
from matplotlib.lines import Line2D
8-
11+
from matplotlib.transforms import Transform, Bound1D
912
# I use if 1 to break up the different regions of code visually
1013

1114
if 1: # load the data
@@ -40,17 +43,28 @@
4043
t = arange(numSamples)/float(numSamples)*10.0
4144
ticklocs = []
4245
ax = subplot(212)
46+
47+
height = 72 # height of one EEG in pixels
48+
# transform data to axes coord (0,1)
49+
transy = Transform(Bound1D(-.05,.05), Bound1D(-.2,.2))
4350
for i in range(numRows):
44-
thisLine = Line2D(ax.dpi, ax.bbox, t, data[:,i]-data[0,i],
45-
transx=ax.xaxis.transData, transy=ax.yaxis.transData)
46-
thisLine.set_vertical_offset(3*i)
51+
thisLine = Line2D(
52+
ax.dpi, ax.bbox, t, data[:,i]-data[0,i],
53+
transx=ax.xaxis.transData,
54+
transy=transy)
55+
offset = (i+1)/(numRows+1)
56+
thisLine.set_vertical_offset(offset, ax.yaxis.transAxis)
57+
4758
ax.add_line(thisLine)
48-
ticklocs.append(3*i)
59+
ticklocs.append(offset)
4960

61+
set(gca(), 'xlim', [0,10])
5062
set(gca(), 'xticks', arange(10))
51-
set(gca(), 'yticks', ticklocs)
52-
set(gca(), 'yticklabels', ['PG3', 'PG5', 'PG7', 'PG9'])
53-
#set(gca(), 'ylim', [0, 20])
63+
yticks = set(gca(), 'yticks', ticklocs)
64+
set(gca(), 'yticklabels', ['PG3', 'PG5', 'PG7', 'PG9'])
65+
66+
# set the yticks to use axes coords on the y axis 10000
67+
set(yticks, 'transform', ax.yaxis.transAxis)
5468
xlabel('time (s)')
5569

5670

examples/subplot_demo.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ def f(t):
1010
t3 = arange(0.0, 2.0, 0.01)
1111

1212
subplot(211)
13-
plot(t1, f(t1), 'bo', t2, f(t2), 'k')
13+
l = plot(t1, f(t1), 'bo', t2, f(t2), 'k')
14+
set(l, 'markerfacecolor', 'g')
1415
grid(True)
1516
title('A tale of 2 subplots')
1617
ylabel('Damped oscillation')
@@ -21,6 +22,6 @@ def f(t):
2122
xlabel('time (s)')
2223
ylabel('Undamped')
2324

24-
savefig('subplot_demo')
25+
savefig('subplot_demo', dpi=600)
2526
show()
2627

examples/system_monitor.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66

77
def get_memory():
88
"Simulate a function that returns system memory"
9-
return 100*(1+sin(0.5*pi*time.time()))
9+
return 100*(0.5+0.5*sin(0.5*pi*time.time()))
1010

1111
def get_cpu():
1212
"Simulate a function that returns cpu usage"
13-
return 100*(1+sin(0.2*pi*(time.time()-0.25)))
13+
return 100*(0.5+0.5*sin(0.2*pi*(time.time()-0.25)))
1414

1515
def get_net():
1616
"Simulate a function that returns network bandwidth"
17-
return 100*(1+sin(0.7*pi*(time.time()-0.1)))
17+
return 100*(0.5+0.5*sin(0.7*pi*(time.time()-0.1)))
1818

1919
def get_stats():
2020
return get_memory(), get_cpu(), get_net()
@@ -37,6 +37,7 @@ def get_stats():
3737
manager = get_current_fig_manager()
3838
def updatefig(*args):
3939
m,c,n = get_stats()
40+
4041
pm.set_height(m)
4142
pc.set_height(c)
4243
pn.set_height(n)

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
ext_modules = []
1414

15-
if 0: # how do I add '--with-gtkgd' flag checking?
15+
if 1: # how do I add '--with-gtkgd' flag checking?
1616
build_gtkgd(ext_modules)
1717

18-
if 0:
18+
if 1:
1919
build_agg(ext_modules)
2020

2121
setup(name="matplotlib",

setupext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def add_agg_flags(module):
5454
include_dirs = ['/usr/X11R6/include', '/home/jdhunter/c/src/agg2/include',
5555
'/usr/include/freetype1', 'src']
5656
library_dirs = ['/usr/X11R6/lib', '/home/jdhunter/c/src/agg2/src']
57-
libraries = ['agg', 'X11', 'm', 'freetype']
57+
libraries = ['agg', 'X11', 'm', 'freetype', 'png']
5858
extra_link_args = []
5959
module.include_dirs.extend(include_dirs)
6060
module.libraries.extend(libraries)

0 commit comments

Comments
 (0)
0