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

Skip to content

Commit a1e3dba

Browse files
committed
added agg backend, changed facecolor to gcface
svn path=/trunk/matplotlib/; revision=135
1 parent ceb3220 commit a1e3dba

6 files changed

Lines changed: 646 additions & 7 deletions

File tree

MANIFEST

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ examples/break.py
2828
examples/color_demo.py
2929
examples/csd_demo.py
3030
examples/data_helper.py
31+
examples/data_table_demo.py
3132
examples/dynamic_demo.py
3233
examples/dynamic_demo_wx.py
3334
examples/embedding_in_gtk.py
@@ -61,6 +62,7 @@ examples/simple_plot.py
6162
examples/stock_demo.py
6263
examples/subplot_demo.py
6364
examples/system_monitor.py
65+
examples/table_demo.py
6466
examples/text_handles.py
6567
examples/text_themes.py
6668
examples/vline_demo.py
@@ -164,6 +166,7 @@ matplotlib/backends/backend_ps.py
164166
matplotlib/backends/backend_template.py
165167
matplotlib/backends/backend_wx.py
166168
matplotlib/backends/ttf_font_manager.py
169+
src/_backend_agg.cpp
167170
test/README
168171
test/alignment_test.py
169172
test/bar_test.py
@@ -183,15 +186,19 @@ test/manset.py
183186
test/matplotlibc_test.py
184187
test/memleak.py
185188
test/memleak2.py
189+
test/memleak3.py
186190
test/mesh_test.py
187191
test/plot_bug.py
192+
test/plotraw.py
188193
test/print_only.py
189194
test/rounding.py
190195
test/semilog_test.py
191196
test/specgram_demo.py
192197
test/table_demo.py
198+
test/table_demo3.py
193199
test/table_test.py
194200
test/table_test2.py
195201
test/test.py
202+
test/test_backend_agg.py
196203
test/transtest.py
197204
test/vline_demo.py

examples/scatter_demo2.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@
88

99
volume = 0.003*intc.volume[:-2]/intc.volume[0]
1010
close = 0.003*intc.close[:-2]/0.003*intc.open[:-2]
11-
scatter(delta1[:-1], delta1[1:], c=close, s=volume)
11+
p = scatter(delta1[:-1], delta1[1:], c=close, s=volume)
12+
set(p, 'alpha', 0.5)
1213
set(gca(), 'xticks', arange(-0.06, 0.061, 0.02))
1314
set(gca(), 'yticks', arange(-0.06, 0.061, 0.02))
1415
xlabel('Delta day i')
1516
ylabel('Delta day i+1')
1617
title('Delta price as a function of volume and percent change')
1718
grid(True)
19+
savefig('scatter_demo2')
1820
show()
1921

2022

examples/subplot_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ def f(t):
2121
xlabel('time (s)')
2222
ylabel('Undamped')
2323

24-
#savefig('subplot_demo', dpi=600)
24+
savefig('subplot_demo')
2525
show()
2626

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import sys,os
33

44
import glob
5-
from setupext import build_gtkgd
5+
from setupext import build_gtkgd, build_agg
66

77

88
data = []
@@ -15,6 +15,8 @@
1515
if 0: # how do I add '--with-gtkgd' flag checking?
1616
build_gtkgd(ext_modules)
1717

18+
if 1:
19+
build_agg(ext_modules)
1820

1921
setup(name="matplotlib",
2022
version= '0.50i',

setupext.py

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"""
55
import sys, os
66
from distutils.core import Extension
7+
78
def getoutput(s):
89
'get the output of a system command'
910
return os.popen(s).read().strip()
@@ -42,11 +43,27 @@ def add_gd_flags(module):
4243
def build_gtkgd(ext_modules):
4344
module = Extension('matplotlib._gtkgd',
4445
['src/_gtkgd.c'],
45-
library_dirs = [],
46-
libraries = [],
47-
include_dirs = [],
48-
extra_link_args = [],
4946
)
5047
add_pygtk_flags(module)
5148
add_gd_flags(module)
5249
ext_modules.append(module)
50+
51+
52+
def add_agg_flags(module):
53+
'Add the module flags to build extensions which use gtk'
54+
include_dirs = ['/usr/X11R6/include', '/home/jdhunter/c/src/agg2/include']
55+
library_dirs = ['/usr/X11R6/lib', '/home/jdhunter/c/src/agg2/src']
56+
libraries = ['agg', 'X11', 'm']
57+
extra_link_args = []
58+
module.include_dirs.extend(include_dirs)
59+
module.libraries.extend(libraries)
60+
module.library_dirs.extend(library_dirs)
61+
module.extra_link_args.extend(extra_link_args)
62+
63+
def build_agg(ext_modules):
64+
module = Extension('matplotlib.backends._backend_agg',
65+
['src/_backend_agg.cpp'],
66+
)
67+
add_agg_flags(module)
68+
ext_modules.append(module)
69+

0 commit comments

Comments
 (0)