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

Skip to content

Commit 533a357

Browse files
committed
image changes
svn path=/trunk/matplotlib/; revision=356
1 parent 77235db commit 533a357

14 files changed

Lines changed: 354 additions & 428 deletions

.matplotlibrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,13 @@ figure.dpi : 80 # figure dots per inch
143143
figure.facecolor : 0.75 # figure facecolor; 0.75 is scalar gray
144144
figure.edgecolor : w # figure edgecolor; w is white
145145

146+
147+
### images
148+
image.aspect : free # free | preserve
149+
image.interpolation : bilinear # see help(imshow) for options
150+
image.cmap : gray # gray | jet
151+
image.lut : 256 # the size of the colormap lookup table
152+
146153
### SAVING FIGURES
147154
# the default savefig params can be different for the GUI backends.
148155
# Eg, you may want a higher resolution, or to make the figure

API_CHANGES

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
API CHANGES in matplotlib-0.xx
2+
3+
ColormapJet and Grayscale are deprecated. For backwards
4+
compatibility, they can be obtained either by doing
5+
6+
from matplotlib.cm import ColormapJet
7+
8+
or
9+
10+
from matplotlib.matlab import *
11+
12+
They are replaced by cm.jet and cm.grey
13+
14+
115
API CHANGES in matplotlib-0.54.3
216

317
removed the set_default_font / get_default_font scheme from the

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
New entries should be added at the top
22
=======
33

4+
2004-06-23 ported code to Perry's new colormap and norm scheme. Added
5+
new rc attributes image.aspect, image.interpolation,
6+
image.cmap, image.lut
7+
48
2004-06-20 backend_gtk.py: replace gtk.TRUE/FALSE with True/False.
59
simplified _make_axis_menu(). - SC
610

TODO

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,4 +436,10 @@
436436

437437
-- DONE Fix stale link on GTK FAQ entry
438438

439-
-- DONE flush all traces of gtkgd
439+
-- DONE flush all traces of gtkgd
440+
441+
-- run backend_driver with numeric and numarray (the latter only with
442+
agg)
443+
444+
-- DONE fix vlines raise in matlab.py
445+
-- fix imshow try/except raise in matlab.py

examples/backend_driver.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
'text_handles.py',
5252
'text_themes.py',
5353
'two_scales.py',
54+
'vline_demo.py',
5455
)
5556

5657
def drive(backend):

examples/layer_images.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@ def func3(x,y):
1717
X,Y = meshgrid(x, y)
1818

1919
Z1 = rand(10,6)
20-
im1 = imshow(Z1, cmap = Grayscale(256))
20+
im1 = imshow(Z1, cmap=cm.gray)
2121
im1.set_interpolation('nearest')
2222
hold(True)
2323

2424
Z2 = func3(X, Y)
25-
im2 = imshow(Z2, cmap=ColormapJet(256), alpha=0.75)
25+
im2 = imshow(Z2, cmap=cm.jet, alpha=0.75)
2626
im2.set_interpolation('nearest')
2727

28+
2829
show()
2930

3031

examples/pcolor_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def func3(x,y):
2020

2121
Z = func3(X, Y)
2222
pcolor(X, Y, Z, shading='flat')
23-
colorbar()
23+
#colorbar()
2424
savefig('pcolor_demo')
2525
show()
2626

examples/pcolor_small.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88

99
c = pcolor(Z)
1010
c.set_linewidth(4)
11-
savefig('pcolor_small')
11+
12+
#savefig('pcolor_small')
1213
show()

examples/vline_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def f(t):
1515
nse = multiply(normal(0.0, 0.3, t.shape), s)
1616

1717
plot(t, s+nse, 'b^')
18-
vlines(t, 0, s, color='k')
18+
vlines(t, [0], s, color='k')
1919
xlabel('time (s)')
2020
title('Comparison of model with data')
2121
show()

setupext.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,8 @@ def build_image(ext_modules, packages, numerix):
324324

325325
deps = ['src/_image.cpp']
326326
deps.extend(glob.glob('agg2/src/*.cpp'))
327+
deps.extend(glob.glob('CXX/*.cxx'))
328+
deps.extend(glob.glob('CXX/*.c'))
327329

328330
module = Extension(
329331
'matplotlib._image',

0 commit comments

Comments
 (0)