Skip to content

Commit 6721163

Browse files
committed
sync to 0.52 release
svn path=/trunk/matplotlib/; revision=184
1 parent c250efe commit 6721163

File tree

13 files changed

+46
-37
lines changed

13 files changed

+46
-37
lines changed

LICENSE/LICENSE

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
LICENSE AGREEMENT FOR MATPLOTLIB 0.51
1+
LICENSE AGREEMENT FOR MATPLOTLIB 0.52
22
--------------------------------------
33

44
1. This LICENSE AGREEMENT is between the John D. Hunter ("JDH"), and
@@ -9,30 +9,30 @@ documentation.
99
2. Subject to the terms and conditions of this License Agreement, JDH
1010
hereby grants Licensee a nonexclusive, royalty-free, world-wide
1111
license to reproduce, analyze, test, perform and/or display publicly,
12-
prepare derivative works, distribute, and otherwise use matplotlib 0.51
12+
prepare derivative works, distribute, and otherwise use matplotlib 0.52
1313
alone or in any derivative version, provided, however, that JDH's
1414
License Agreement and JDH's notice of copyright, i.e., "Copyright (c)
1515
2002, 2003 John D. Hunter; All Rights Reserved" are retained in
16-
matplotlib 0.51 alone or in any derivative version prepared by
16+
matplotlib 0.52 alone or in any derivative version prepared by
1717
Licensee.
1818

1919
3. In the event Licensee prepares a derivative work that is based on
20-
or incorporates matplotlib 0.51 or any part thereof, and wants to make
20+
or incorporates matplotlib 0.52 or any part thereof, and wants to make
2121
the derivative work available to others as provided herein, then
2222
Licensee hereby agrees to include in any such work a brief summary of
23-
the changes made to matplotlib 0.51.
23+
the changes made to matplotlib 0.52.
2424

25-
4. JDH is making matplotlib 0.51 available to Licensee on an "AS IS"
25+
4. JDH is making matplotlib 0.52 available to Licensee on an "AS IS"
2626
basis. JDH MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
2727
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, JDH MAKES NO AND
2828
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
29-
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB 0.51 WILL NOT
29+
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB 0.52 WILL NOT
3030
INFRINGE ANY THIRD PARTY RIGHTS.
3131

3232
5. JDH SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF
33-
MATPLOTLIB 0.51 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES
33+
MATPLOTLIB 0.52 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES
3434
OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING
35-
MATPLOTLIB 0.51, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE
35+
MATPLOTLIB 0.52, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE
3636
POSSIBILITY THEREOF.
3737

3838
6. This License Agreement will automatically terminate upon a material
@@ -44,6 +44,6 @@ Licensee. This License Agreement does not grant permission to use JDH
4444
trademarks or trade name in a trademark sense to endorse or promote
4545
products or services of Licensee, or any third party.
4646

47-
8. By copying, installing or otherwise using matplotlib 0.51, Licensee
47+
8. By copying, installing or otherwise using matplotlib 0.52, Licensee
4848
agrees to be bound by the terms and conditions of this License
4949
Agreement.

MANIFEST

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ GOALS
66
INSTALL
77
INTERACTIVE
88
KNOWN_BUGS
9-
MANIFEST
109
MANIFEST.in
1110
Makefile
1211
README
@@ -266,10 +265,12 @@ examples/embedding_in_gtk2.py
266265
examples/embedding_in_wx.py
267266
examples/errorbar_demo.py
268267
examples/figtext.py
268+
examples/fill_demo.py
269269
examples/ftface_props.py
270270
examples/gdtest.py
271271
examples/histogram_demo.py
272272
examples/image_demo.py
273+
examples/image_demo2.py
273274
examples/interactive.py
274275
examples/interactive2.py
275276
examples/legend_demo.py
@@ -286,11 +287,13 @@ examples/mri_with_eeg.py
286287
examples/multiple_figs_demo.py
287288
examples/object_picker.py
288289
examples/pcolor_demo.py
290+
examples/pcolor_demo2.py
289291
examples/psd_demo.py
290292
examples/pstest.py
291293
examples/scatter_demo.py
292294
examples/scatter_demo2.py
293295
examples/simple_plot.py
296+
examples/specgram_demo.py
294297
examples/stock_demo.py
295298
examples/subplot_demo.py
296299
examples/system_monitor.py
@@ -432,14 +435,19 @@ src/_tkagg.cpp
432435
src/ft2font.c
433436
src/ft2font.h
434437
ttfquery/__init__.py
438+
ttfquery/__init__.pyc
435439
ttfquery/_scriptregistry.py
440+
ttfquery/_scriptregistry.pyc
436441
ttfquery/describe.py
442+
ttfquery/describe.pyc
437443
ttfquery/family_query.py
438444
ttfquery/findsystem.py
445+
ttfquery/findsystem.pyc
439446
ttfquery/font_family_groups.py
440447
ttfquery/glyph.py
441448
ttfquery/glyphquery.py
442449
ttfquery/guessdescription.py
443450
ttfquery/license.txt
444451
ttfquery/metadata_query.py
445452
ttfquery/ttffiles.py
453+
ttfquery/ttffiles.pyc

Makefile

Lines changed: 4 additions & 1 deletion
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.26 2004/03/16 20:26:36 jdh2358
6+
# sync to 0.52 release
7+
#
58
# Revision 1.25 2004/03/15 14:49:46 jdh2358
69
# updated image to work with data coords; moved image extendsion to _image
710
#
@@ -82,7 +85,7 @@ PYTHON = /usr/local/bin/python2.3
8285
PYDOC = /usr/local/bin/pydoc
8386
VERSION = `${PYTHON} setup.py --version`
8487

85-
DISTFILES = API_CHANGES KNOWN_BUGS INSTALL README TODO LICENSE \
88+
DISTFILES = API_CHANGES KNOWN_BUGS INSTALL README TODO license \
8689
CHANGELOG Makefile GOALS INTERACTIVE \
8790
MANIFEST.in matplotlib examples setup.py
8891

TODO

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,4 +272,6 @@
272272

273273
-- DONE - support partial window expose redraws in agg
274274

275-
-- Fix datalim problem with aspect preserved for image backend
275+
-- Fix datalim problem with aspect preserved for image backend
276+
277+
- add get_xlim and get_ylim for patches

examples/backend_driver.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@
1717
'barchart_demo.py',
1818
'color_demo.py',
1919
'csd_demo.py',
20+
'fill_demo.py',
2021
'figtext.py',
2122
'histogram_demo.py',
23+
'image_demo.py',
24+
'image_demo2.py',
2225
'legend_demo.py',
2326
'legend_demo2.py',
2427
'line_styles.py',
@@ -28,11 +31,13 @@
2831
'mri_with_eeg.py',
2932
'multiple_figs_demo.py',
3033
'pcolor_demo.py',
34+
'pcolor_demo2.py',
3135
'psd_demo.py',
3236
'scatter_demo.py',
3337
'scatter_demo2.py',
3438
'simple_plot.py',
3539
'stock_demo.py',
40+
'specgram_demo.py',
3641
'subplot_demo.py',
3742
'table_demo.py',
3843
'text_handles.py',

examples/fill_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
t = arange(0.0, 1.01, 0.01)
33
s = sin(2*2*pi*t)
44

5-
fill(t, s, 'r')
5+
fill(t, s*exp(-5*t), 'r')
66
grid(True)
77
show()

examples/image_demo.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ def bivariate_normal(X, Y, sigmax=1.0, sigmay=1.0,
1515
z = Xmu**2/sigmax**2 + Ymu**2/sigmay - 2*rho*Xmu*Ymu/(sigmax*sigmay)
1616
return 1.0/(2*pi*sigmax*sigmay*(1-rho**2)) * exp( -z/(2*(1-rho**2)))
1717

18-
def normz(Z):
19-
'constrain array to be in 0,1'
20-
minz = min(min(Z))
21-
maxz = max(max(Z))
22-
return 1.0/(maxz-minz)*(Z-minz)
2318

2419
delta = 0.025
2520
x = arange(-3.0, 3.0, delta)
@@ -29,13 +24,13 @@ def normz(Z):
2924
Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
3025

3126
# difference of Gaussians
32-
im = imshow(normz(Z2-Z1))
27+
im = imshow(Z2-Z1)
3328

3429
# set the interpolation method: 'nearest', 'bilinear', 'bicubic' and much more
3530
im.set_interpolation('bilinear')
3631

3732

3833
axis('off')
39-
savefig('test')
34+
#savefig('test')
4035
show()
4136

examples/image_demo2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
A.shape = w, h
88

99
im = imshow(A)
10-
im.set_aspect('free')
10+
#im.set_aspect('preserve')
1111

1212
# plot some data with the image; currently broken with aspect preserve
1313
gca().set_image_extent(0, 25, 0, 25)

examples/mri_demo.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
dfile = 'data/s1045.ima'
55
im = fromstring(file(dfile, 'rb').read(), Int16).astype(Float)
66
im.shape = 256, 256
7-
# flip upside down
8-
im = array([im[i] for i in arange(255,-1,-1)])
97

10-
pcolor(im, shading='flat')
8+
imshow(im, ColormapJet(256))
119
axis('off')
1210
#savefig('mri_demo')
1311
show()

examples/mri_with_eeg.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
# note, this is currentl *very slow*. I'm working on improving the
2-
# efficiency of pcolor. If you want to run this example and your
3-
# computer is not very fast, I suggest you grab a cup of coffee while
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-
# code
7-
1+
"""
2+
This now uses the imshow command instead of pcolor which *is much
3+
faster*
4+
"""
85
from __future__ import division
96
from matplotlib.matlab import *
107
from matplotlib.lines import Line2D
@@ -16,12 +13,10 @@
1613
dfile = 'data/s1045.ima'
1714
im = fromstring(file(dfile, 'rb').read(), Int16).astype(Float)
1815
im.shape = 256, 256
19-
# flip upside down
20-
im = array([im[i] for i in arange(255,-1,-1)])
2116

2217
if 1: # plot the MRI in pcolor
2318
subplot(221)
24-
pcolor(im, shading='flat')
19+
imshow(im, ColormapJet(256))
2520
axis('off')
2621

2722
if 1: # plot the histogram of MRI intensity

examples/pcolor_demo.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
"""
2+
See pcolor_demo2 for a much faster way of generating pcolor plots
3+
"""
14
from __future__ import division
25
from matplotlib.matlab import *
36

setup.py

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

100100

101101
setup(name="matplotlib",
102-
version= '0.52c',
102+
version= '0.52',
103103
description = "Matlab style python plotting package",
104104
author = "John D. Hunter",
105105
author_email="jdhunter@ace.bsd.uchicago.edu",

src/_backend_agg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ RendererAgg_draw_image(RendererAggObject *renderer, PyObject* args) {
577577
return NULL;
578578

579579
//todo: handle x and y
580-
agg::rect r(0, 0, image->widthOut, image->heightOut);
580+
agg::rect r(0, 0, image->rowsOut, image->colsOut);
581581

582582
renderer->rbase->copy_from(*image->rbufOut, &r, x, y);
583583
Py_INCREF(Py_None);

0 commit comments

Comments
 (0)