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

Skip to content

Commit f1903c3

Browse files
committed
added paint backend
svn path=/trunk/matplotlib/; revision=130
1 parent adcbc63 commit f1903c3

6 files changed

Lines changed: 115 additions & 9 deletions

File tree

KNOWN_BUGS

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

2222
- x and y ticklabels overlap at origin
2323

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

2626
- mri with eeg offsets whacked
2727

MANIFEST

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ INSTALL
55
INTERACTIVE
66
KNOWN_BUGS
77
LICENSE
8+
MANIFEST
89
MANIFEST.in
910
Makefile
1011
README
1112
TODO
13+
__init__.py
1214
setup.py
15+
setupext.py
1316
examples/README
1417
examples/__init__.py
1518
examples/anim.py
@@ -20,6 +23,7 @@ examples/bar_stacked.py
2023
examples/barchart_demo.py
2124
examples/batch_figs.py
2225
examples/batch_test_gd.py
26+
examples/break.py
2327
examples/color_demo.py
2428
examples/csd_demo.py
2529
examples/data_helper.py
@@ -58,6 +62,7 @@ examples/subplot_demo.py
5862
examples/system_monitor.py
5963
examples/text_handles.py
6064
examples/text_themes.py
65+
examples/vline_demo.py
6166
examples/wx_demo.py
6267
examples/xvfb_demo.py
6368
examples/data/AAPL.dat
@@ -146,14 +151,41 @@ matplotlib/lines.py
146151
matplotlib/matlab.py
147152
matplotlib/mlab.py
148153
matplotlib/patches.py
154+
matplotlib/table.py
149155
matplotlib/text.py
150156
matplotlib/transforms.py
151157
matplotlib/backends/__init__.py
152158
matplotlib/backends/backend_gd.py
153159
matplotlib/backends/backend_gtk.py
154160
matplotlib/backends/backend_gtkgd.py
161+
matplotlib/backends/backend_paint.py
155162
matplotlib/backends/backend_ps.py
156163
matplotlib/backends/backend_template.py
157164
matplotlib/backends/backend_wx.py
158-
src/_matplotlibc.c
165+
matplotlib/backends/ttf_font_manager.py
166+
test/README
167+
test/alignment_test.py
168+
test/bar_test.py
169+
test/batchtest.py
170+
test/batchtest2.py
171+
test/break.py
172+
test/center_test.py
173+
test/clip_end.py
174+
test/dash_test.py
175+
test/gd2gtk_test.py
176+
test/gtk2_test.py
177+
test/highres_test.py
178+
test/hist_test.py
179+
test/line_thickness.py
180+
test/lots_o_points.py
181+
test/matplotlibc_test.py
182+
test/mesh_test.py
183+
test/plot_bug.py
184+
test/print_only.py
185+
test/rounding.py
186+
test/semilog_test.py
187+
test/specgram_demo.py
188+
test/table_demo.py
159189
test/test.py
190+
test/transtest.py
191+
test/vline_demo.py

TODO

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696

9797
-- DONE compile pygtk for threads on win32.
9898

99-
-- There is a bug in vertical rendering of text that is exposed in the
99+
-- DONE 2004-02-04 There is a bug in vertical rendering of text that is exposed in the
100100
text, but not the ylabel, command. It looks like a pixmap or
101101
images is not being properly initialized, resulting in pixel noise.
102102

@@ -166,4 +166,5 @@
166166

167167
-- DONE 2003-12-15 - fix install path bug
168168

169-
-- Scale line width with DPI
169+
-- Scale line width with DPI
170+

examples/alignment_test.py

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
"""
2+
You can precisely layout text in data or axes (0,1) coordinates. This
3+
example shows you some of the alignment and rotation specifications to
4+
layout text
5+
"""
6+
7+
from matplotlib.matlab import *
8+
from matplotlib.lines import Line2D
9+
from matplotlib.patches import Rectangle
10+
from matplotlib.transforms import Transform
11+
12+
# build a rectangle in axes coords
13+
left, width = .25, .5
14+
bottom, height = .25, .5
15+
right = left + width
16+
top = bottom + height
17+
ax = gca()
18+
p = Rectangle(ax.dpi, ax.bbox,
19+
(left, bottom), width, height,
20+
fill=False,
21+
transx=ax.xaxis.transAxis,
22+
transy=ax.yaxis.transAxis)
23+
p.set_clip_on(False)
24+
ax.add_patch(p)
25+
26+
27+
ax.text(left, bottom, 'left top',
28+
horizontalalignment='left',
29+
verticalalignment='top',
30+
transx=ax.xaxis.transAxis,
31+
transy=ax.yaxis.transAxis)
32+
33+
ax.text(right, top, 'right bottom',
34+
horizontalalignment='right',
35+
verticalalignment='bottom',
36+
transx=ax.xaxis.transAxis,
37+
transy=ax.yaxis.transAxis)
38+
39+
ax.text(right, top, 'right top',
40+
horizontalalignment='right',
41+
verticalalignment='top',
42+
transx=ax.xaxis.transAxis,
43+
transy=ax.yaxis.transAxis)
44+
45+
ax.text(right, bottom, 'center top',
46+
horizontalalignment='center',
47+
verticalalignment='top',
48+
transx=ax.xaxis.transAxis,
49+
transy=ax.yaxis.transAxis)
50+
51+
ax.text(left, 0.5*(bottom+top), 'right center',
52+
horizontalalignment='right',
53+
verticalalignment='center',
54+
rotation='vertical',
55+
transx=ax.xaxis.transAxis,
56+
transy=ax.yaxis.transAxis)
57+
58+
ax.text(0.5*(left+right), 0.5*(bottom+top), 'middle',
59+
horizontalalignment='center',
60+
verticalalignment='center',
61+
transx=ax.xaxis.transAxis,
62+
transy=ax.yaxis.transAxis)
63+
64+
ax.text(right, 0.5*(bottom+top), 'centered',
65+
horizontalalignment='center',
66+
verticalalignment='center',
67+
rotation='vertical',
68+
transx=ax.xaxis.transAxis,
69+
transy=ax.yaxis.transAxis)
70+
71+
axis('off')
72+
savefig('alignment_test')
73+
show()

examples/simple_plot.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
from matplotlib.matlab import *
22

3-
t = arange(0.0, 1.0, 0.002)
3+
t = arange(0.0, 1.0, 0.02)
44
s = sin(2*2*pi*t)
5-
plot(t, s)
5+
plot(t, s, '+')
66

77
xlabel('time (s)')
88
ylabel('voltage (mV)')
99
title('About as simple as it gets, folks')
1010
grid(True)
11-
savefig('painttest')
12-
11+
savefig('simple_plot', dpi=300)
12+
show()

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
setup(name="matplotlib",
20-
version= '0.50g',
20+
version= '0.50h',
2121
description = "Matlab style python plotting package",
2222
author = "John D. Hunter",
2323
author_email="[email protected]",

0 commit comments

Comments
 (0)