Skip to content

Commit 9fa316f

Browse files
committed
preparing 0.83.2
svn path=/trunk/matplotlib/; revision=1573
1 parent 2e3f321 commit 9fa316f

18 files changed

+240
-156
lines changed

API_CHANGES

+116-118
Original file line numberDiff line numberDiff line change
@@ -1,172 +1,170 @@
11

22
API Changes in matplotlib-0.83
33

4-
Made HOME/.matplotlib the new config dir where the matplotlibrc
5-
file, the ttf.cache, and the tex.cache live. The new default
6-
filenames in .matplotlib have no leading dot and are not hidden.
7-
Eg, the new names are matplotlibrc tex.cache ttffont.cache. This is
8-
how ipython does it so it must be right.
9-
10-
If old files are found, a warning is issued and they are
11-
moved to the new location.
12-
13-
backends/__init__.py no longer imports new_figure_manager,
14-
draw_if_interactive and show from the default backend, but puts
15-
these imports into a call to pylab_setup. Also, the Toolbar is no
16-
longer imported from WX/WXAgg. New usage
17-
18-
from backends import pylab_setup
19-
new_figure_manager, draw_if_interactive, show = pylab_setup()
20-
4+
- Made HOME/.matplotlib the new config dir where the matplotlibrc
5+
file, the ttf.cache, and the tex.cache live. The new default
6+
filenames in .matplotlib have no leading dot and are not hidden.
7+
Eg, the new names are matplotlibrc, tex.cache, and ttffont.cache.
8+
This is how ipython does it so it must be right.
9+
10+
If old files are found, a warning is issued and they are moved to
11+
the new location.
12+
13+
- backends/__init__.py no longer imports new_figure_manager,
14+
draw_if_interactive and show from the default backend, but puts
15+
these imports into a call to pylab_setup. Also, the Toolbar is no
16+
longer imported from WX/WXAgg. New usage:
17+
18+
from backends import pylab_setup
19+
new_figure_manager, draw_if_interactive, show = pylab_setup()
2120

22-
Moved Figure.get_width_height() to FigureCanvasBase. It now returns
23-
int instead of float.
21+
- Moved Figure.get_width_height() to FigureCanvasBase. It now
22+
returns int instead of float.
2423

2524
API Changes in matplotlib-0.82
2625

27-
= toolbar import change in GTKAgg, GTKCairo and WXAgg =
26+
- toolbar import change in GTKAgg, GTKCairo and WXAgg
2827

29-
Added subplot config tool to GTK* backends -- note you must now
30-
import the NavigationToolbar2 from your backend of choice rather
31-
than from backend_gtk because it needs to know about the backend
32-
specific canvas -- see examples/embedding_in_gtk2.py. Ditto for wx
33-
backend -- see examples/embedding_in_wxagg.py
28+
- Added subplot config tool to GTK* backends -- note you must now
29+
import the NavigationToolbar2 from your backend of choice rather
30+
than from backend_gtk because it needs to know about the backend
31+
specific canvas -- see examples/embedding_in_gtk2.py. Ditto for
32+
wx backend -- see examples/embedding_in_wxagg.py
3433

3534

36-
= hist bin change =
35+
- hist bin change
3736

38-
Sean Richards notes there was a problem in the way we created the
39-
binning for histogram, which made the last bin underrepresented.
40-
From his post
37+
Sean Richards notes there was a problem in the way we created
38+
the binning for histogram, which made the last bin
39+
underrepresented. From his post:
4140

42-
I see that hist uses the linspace function to create the bins and
43-
then uses searchsorted to put the values in their correct
44-
bin. Thats all good but I am confused over the use of linspace for
45-
the bin creation. I wouldn't have thought that it does what is
46-
needed, to quote the docstring it creates a "Linear spaced array
47-
from min to max". For it to work correctly shouldn't the values in
48-
the bins array be the same bound for each bin? (i.e. each value
49-
should be the lower bound of a bin). To provide the correct bins
50-
for hist would it not be something like
41+
I see that hist uses the linspace function to create the bins
42+
and then uses searchsorted to put the values in their correct
43+
bin. Thats all good but I am confused over the use of linspace
44+
for the bin creation. I wouldn't have thought that it does
45+
what is needed, to quote the docstring it creates a "Linear
46+
spaced array from min to max". For it to work correctly
47+
shouldn't the values in the bins array be the same bound for
48+
each bin? (i.e. each value should be the lower bound of a
49+
bin). To provide the correct bins for hist would it not be
50+
something like
5151

52-
def bins(xmin, xmax, N):
53-
if N==1: return xmax
54-
dx = (xmax-xmin)/N # instead of N-1
55-
return xmin + dx*arange(N)
56-
52+
def bins(xmin, xmax, N):
53+
if N==1: return xmax
54+
dx = (xmax-xmin)/N # instead of N-1
55+
return xmin + dx*arange(N)
5756

58-
This suggestion in implemented in 0.81. My test script with these
59-
changes does not reveal any bias in the binning
6057

61-
from matplotlib.numerix.mlab import randn, rand, zeros, Float
62-
from matplotlib.mlab import hist, mean
58+
This suggestion is implemented in 0.81. My test script with these
59+
changes does not reveal any bias in the binning
6360

64-
Nbins = 50
65-
Ntests = 200
66-
results = zeros((Ntests,Nbins), typecode=Float)
67-
for i in range(Ntests):
68-
print 'computing', i
69-
x = rand(10000)
70-
n, bins = hist(x, Nbins)
71-
results[i] = n
72-
print mean(results)
61+
from matplotlib.numerix.mlab import randn, rand, zeros, Float
62+
from matplotlib.mlab import hist, mean
7363

64+
Nbins = 50
65+
Ntests = 200
66+
results = zeros((Ntests,Nbins), typecode=Float)
67+
for i in range(Ntests):
68+
print 'computing', i
69+
x = rand(10000)
70+
n, bins = hist(x, Nbins)
71+
results[i] = n
72+
print mean(results)
7473

7574

7675
API CHANGES in matplotlib-0.81
7776

77+
- pylab and artist "set" functions renamed to setp to avoid clash
78+
with python2.4 built-in set. Current version will issue a
79+
deprecation warning which will be removed in future versions
7880

79-
pylab and artist "set" functions renamed to setp to avoid clash with
80-
python2.4 built-in set. Current version will issue a deprecation
81-
warning which will be removed in future versions
81+
- imshow interpolation arguments changes for advanced interpolation
82+
schemes. See help imshow, particularly the interpolation,
83+
filternorm and filterrad kwargs
8284

83-
imshow interpolation arguments changes for advanced interpolation
84-
schemes. See help imshow, particularly the interpolation,
85-
filternorm and filterrad kwargs
85+
- Support for masked arrays has been added to the plot command and
86+
to the Line2D object. Only the valid points are plotted. A
87+
"valid_only" kwarg was added to the get_xdata() and get_ydata()
88+
methods of Line2D; by default it is False, so that the original
89+
data arrays are returned. Setting it to True returns the plottable
90+
points.
8691

87-
Support for masked arrays has been added to the plot command and to
88-
the Line2D object. Only the valid points are plotted. A
89-
"valid_only" kwarg was added to the get_xdata() and get_ydata()
90-
methods of Line2D; by default it is False, so that the original data
91-
arrays are returned. Setting it to True returns the plottable
92-
points.
92+
- contour changes:
9393

94-
contour changes:
94+
Masked arrays: contour and contourf now accept masked arrays as
95+
the variable to be contoured. Masking works correctly for
96+
contour, but a bug remains to be fixed before it will work for
97+
contourf. The "badmask" kwarg has been removed from both
98+
functions.
9599

96-
Masked arrays: contour and contourf now accept masked arrays as the
97-
variable to be contoured. Masking works correctly for contour,
98-
but a bug remains to be fixed before it will work for contourf.
99-
The "badmask" kwarg has been removed from both functions.
100+
Level argument changes:
100101

101-
Level argument changes:
102+
Old version: a list of levels as one of the positional
103+
arguments specified the lower bound of each filled region; the
104+
upper bound of the last region was taken as a very large
105+
number. Hence, it was not possible to specify that z values
106+
between 0 and 1, for example, be filled, and that values
107+
outside that range remain unfilled.
102108

103-
Old version: a list of levels as one of the positional arguments
104-
specified the lower bound of each filled region; the upper bound
105-
of the last region was taken as a very large number. Hence, it
106-
was not possible to specify that z values between 0 and 1, for
107-
example, be filled, and that values outside that range remain
108-
unfilled.
109+
New version: a list of N levels is taken as specifying the
110+
boundaries of N-1 z ranges. Now the user has more control over
111+
what is colored and what is not. Repeated calls to contourf
112+
(with different colormaps or color specifications, for example)
113+
can be used to color different ranges of z. Values of z
114+
outside an expected range are left uncolored.
109115

110-
New version: a list of N levels is taken as specifying the
111-
boundaries of N-1 z ranges. Now the user has more control over
112-
what is colored and what is not. Repeated calls to contourf
113-
(with different colormaps or color specifications, for example)
114-
can be used to color different ranges of z. Values of z outside
115-
an expected range are left uncolored.
116-
117-
Example:
118-
Old: contourf(z, [0, 1, 2]) would yield 3 regions: 0-1, 1-2, and >2.
119-
New: it would yield 2 regions: 0-1, 1-2. If the same 3 regions were
120-
desired, the equivalent list of levels would be [0, 1, 2, 1e38].
121-
122-
123-
116+
Example:
117+
Old: contourf(z, [0, 1, 2]) would yield 3 regions: 0-1, 1-2, and >2.
118+
New: it would yield 2 regions: 0-1, 1-2. If the same 3 regions were
119+
desired, the equivalent list of levels would be [0, 1, 2,
120+
1e38].
124121

125122

126123
API CHANGES in matplotlib-0.80
127124

128-
xlim/ylim/axis always return the new limits regardless of arguments.
129-
They now take kwargs which allow you to selectively change the upper
130-
or lower limits while leaving unnamed limits unchanged. See
131-
help(xlim) for example
125+
- xlim/ylim/axis always return the new limits regardless of
126+
arguments. They now take kwargs which allow you to selectively
127+
change the upper or lower limits while leaving unnamed limits
128+
unchanged. See help(xlim) for example
132129

133130
API CHANGES in matplotlib-0.73
134131

135-
Removed deprecated ColormapJet and friends
132+
- Removed deprecated ColormapJet and friends
136133

137-
Removed all error handling from the verbose object
134+
- Removed all error handling from the verbose object
138135

139-
figure num of zero is now allowed
136+
- figure num of zero is now allowed
140137

141138
API CHANGES in matplotlib-0.72
142139

143-
Line2D, Text, and Patch copy_properties renamed update_from and
144-
moved into artist base class
140+
- Line2D, Text, and Patch copy_properties renamed update_from and
141+
moved into artist base class
145142

146-
LineCollecitons.color renamed to LineCollections.set_color for
147-
consistency with set/get introspection mechanism,
143+
- LineCollecitons.color renamed to LineCollections.set_color for
144+
consistency with set/get introspection mechanism,
148145

149-
pylab figure now defaults to num=None, which creates a new figure
150-
with a guaranteed unique number
146+
- pylab figure now defaults to num=None, which creates a new figure
147+
with a guaranteed unique number
151148

152-
contsour method syntax changed - now it is matlab compatible
149+
- contour method syntax changed - now it is matlab compatible
153150

154-
unchanged: contour(Z)
155-
old: contour(Z, x=Y, y=Y)
156-
new: contour(X, Y, Z)
151+
unchanged: contour(Z)
152+
old: contour(Z, x=Y, y=Y)
153+
new: contour(X, Y, Z)
157154

158-
see http://matplotlib.sf.net/matplotlib.pylab.html#-contour
155+
see http://matplotlib.sf.net/matplotlib.pylab.html#-contour
159156

160157

161-
Increased the default resolution for save command.
158+
- Increased the default resolution for save command.
162159

163-
Renamed the base attribute of the ticker classes to _base to avoid conflict
164-
with the base method. Sitt for subs
160+
- Renamed the base attribute of the ticker classes to _base to avoid conflict
161+
with the base method. Sitt for subs
165162

166-
subs=none now does autosubbing in the tick locator.
163+
- subs=none now does autosubbing in the tick locator.
167164

168-
New subplots that overlap old will delete the old axes. If you do
169-
not want this behavior, use fig.add_subplot or the axes command
165+
- New subplots that overlap old will delete the old axes. If you
166+
do not want this behavior, use fig.add_subplot or the axes
167+
command
170168

171169
API CHANGES in matplotlib-0.71
172170

CHANGELOG

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
New entries should be added at the top
22

3+
4+
2005-07-27 Applied SF patch 1242648: minor rounding error in
5+
IndexDateFormatter in dates.py
6+
7+
2005-07-27 Applied sf patch 1244732: Scale axis such that circle
8+
looks like circle - JDH
39
2005-07-29 Improved message reporting in texmanager and backend_ps - DSD
410

511
2005-07-28 backend_gtk.py: update FigureCanvasGTK.draw() (needed due to the

CXX/cxx_extensions.cxx

+5-1
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,11 @@ PythonExtensionBase::PythonExtensionBase()
10281028

10291029
PythonExtensionBase::~PythonExtensionBase()
10301030
{
1031-
assert( ob_refcnt == 0 );
1031+
//JDH:
1032+
//win32 appears to have a bug; when a class throws an
1033+
//exception, the assert fails.
1034+
1035+
//assert( ob_refcnt == 0 );
10321036
}
10331037

10341038
int PythonExtensionBase::print( FILE *, int )

LICENSE/LICENSE

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
LICENSE AGREEMENT FOR MATPLOTLIB 0.83.1
1+
LICENSE AGREEMENT FOR MATPLOTLIB 0.83.2
22
--------------------------------------
33

44
1. This LICENSE AGREEMENT is between John D. Hunter ("JDH"), and the
@@ -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 license
1111
to reproduce, analyze, test, perform and/or display publicly, prepare
12-
derivative works, distribute, and otherwise use matplotlib 0.83.1
12+
derivative works, distribute, and otherwise use matplotlib 0.83.2
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-2005 John D. Hunter; All Rights Reserved" are retained in
16-
matplotlib 0.83.1 alone or in any derivative version prepared by
16+
matplotlib 0.83.2 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 or
20-
incorporates matplotlib 0.83.1 or any part thereof, and wants to
20+
incorporates matplotlib 0.83.2 or any part thereof, and wants to
2121
make 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.83.1.
23+
the changes made to matplotlib 0.83.2.
2424

25-
4. JDH is making matplotlib 0.83.1 available to Licensee on an "AS
25+
4. JDH is making matplotlib 0.83.2 available to Licensee on an "AS
2626
IS" 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.83.1
29+
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB 0.83.2
3030
WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
3131

3232
5. JDH SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF MATPLOTLIB
33-
0.83.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR
33+
0.83.2 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR
3434
LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING
35-
MATPLOTLIB 0.83.1, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF
35+
MATPLOTLIB 0.83.2, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF
3636
THE 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.83.1,
47+
8. By copying, installing or otherwise using matplotlib 0.83.2,
4848
Licensee agrees to be bound by the terms and conditions of this License
4949
Agreement.

MANIFEST

+4-1
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ examples/dynamic_image_wxagg.py
332332
examples/dynamic_image_wxagg2.py
333333
examples/embedding_in_gtk.py
334334
examples/embedding_in_gtk2.py
335+
examples/embedding_in_gtk3.py
335336
examples/embedding_in_qt.py
336337
examples/embedding_in_tk.py
337338
examples/embedding_in_tk2.py
@@ -451,9 +452,10 @@ examples/data/s1045.ima
451452
examples/widgets/README
452453
examples/widgets/buttons.py
453454
examples/widgets/check_buttons.py
455+
examples/widgets/cursor.py
454456
examples/widgets/radio_buttons.py
455457
examples/widgets/sliders.py
456-
fonts/BaKoMa-CM.Fonts
458+
examples/widgets/span_selector.py
457459
fonts/afm/cmex10.afm
458460
fonts/afm/cmmi10.afm
459461
fonts/afm/cmr10.afm
@@ -1273,6 +1275,7 @@ lib/pytz/zoneinfo/US/Samoa.py
12731275
lib/pytz/zoneinfo/US/__init__.py
12741276
license/DATEUTIL_LICENSE.txt
12751277
license/LICENSE
1278+
license/LICENSE_BAKOMA
12761279
license/LICENSE_PAINT
12771280
license/LICENSE_PIL
12781281
license/LICENSE_enthought.txt

0 commit comments

Comments
 (0)