Skip to content

Commit e5408fb

Browse files
committed
Merged revisions 4506-4561 via svnmerge from
http://matplotlib.svn.sf.net/svnroot/matplotlib/trunk/matplotlib ........ r4507 | jdh2358 | 2007-11-29 15:16:48 -0500 (Thu, 29 Nov 2007) | 2 lines Applied Ludwigs build tkagg w/o x11 server patch ........ r4509 | jdh2358 | 2007-11-29 17:19:26 -0500 (Thu, 29 Nov 2007) | 2 lines commited ludwigs axes3d patch ........ r4512 | cmoad | 2007-11-29 21:40:30 -0500 (Thu, 29 Nov 2007) | 1 line minor rev bump ........ r4513 | cmoad | 2007-11-29 21:41:01 -0500 (Thu, 29 Nov 2007) | 1 line minor rev bump ........ r4514 | cmoad | 2007-11-29 21:47:06 -0500 (Thu, 29 Nov 2007) | 1 line minor rev bump ........ r4515 | cmoad | 2007-11-29 22:42:35 -0500 (Thu, 29 Nov 2007) | 1 line CXX/WrapPython.h missing from MANIFEST ........ r4516 | cmoad | 2007-11-29 23:00:16 -0500 (Thu, 29 Nov 2007) | 1 line ttconv missing from MANFEST ........ r4517 | cmoad | 2007-11-29 23:09:48 -0500 (Thu, 29 Nov 2007) | 1 line added setup.cfg.template ........ r4532 | mdboom | 2007-11-30 14:48:41 -0500 (Fri, 30 Nov 2007) | 2 lines Fix mathtext in example. ........ r4537 | astraw | 2007-12-01 15:12:05 -0500 (Sat, 01 Dec 2007) | 2 lines Fix loading of AAPL data in get_two_stock_data() ........ r4557 | mdboom | 2007-12-03 08:20:19 -0500 (Mon, 03 Dec 2007) | 2 lines Fix missing font file error. ........ r4560 | jdh2358 | 2007-12-03 10:23:32 -0500 (Mon, 03 Dec 2007) | 2 lines fixed a gtk import else block in mlab ........ r4561 | mdboom | 2007-12-03 10:23:47 -0500 (Mon, 03 Dec 2007) | 3 lines Remove paragraph about MATPLOTLIBDATA environment variable, since it doesn't really apply anymore. ........ svn path=/branches/transforms/; revision=4562
1 parent 1aa9c22 commit e5408fb

12 files changed

+173
-120
lines changed

API_CHANGES

+2
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ TRANSFORMS REFACTORING
169169

170170
END OF TRANSFORMS REFACTORING
171171

172+
0.91.1 Released
173+
172174
0.91.0 Released
173175

174176
Changed cbook.is_file_like to cbook.is_writable_file_like and

CHANGELOG

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
===============================================================
2+
2007-11-27 Released 0.91.1 at revision 4517
3+
14
===============================================================
25
2007-11-27 Released 0.91.0 at revision 4478
36

CODING_GUIDE

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ python, C and C++
117117

118118

119119

120-
for older versions of emacs (emacs<22) you may need to do
120+
for older versions of emacs (emacs<22) you need to do
121121

122122
(add-hook 'python-mode-hook
123123
(lambda ()

INSTALL

+5-9
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ INTRODUCTION
1414
more. If you want to produce PNGs or GUI images that support all of
1515
matplotlib's features, you should compile matplotlib with agg
1616
support and use one of the GUI agg backends: GTKAgg, WXAgg, TkAgg or
17-
FLTKAgg.
17+
FLTKAgg.
1818

1919
COMPILING
2020

@@ -36,7 +36,7 @@ COMPILING
3636
As discussed above, most users will want to set 'BUILD_AGG = 1' and
3737
one or more of the GUI backends to True. Exceptions to this are if
3838
you know you don't need a GUI (eg a web server) or you only want to
39-
produce vector graphics.
39+
produce vector graphics.
4040

4141
If you have installed prerequisites to nonstandard places and need
4242
to inform matplotlib where they are, edit setupext.py an add the
@@ -53,16 +53,12 @@ COMPILING
5353
with matplotlib, it is important that you have *both* present and in
5454
your PYTHONPATH when you compile matplotlib.
5555

56-
Note that if you install matplotlib anywhere other than the default
57-
location, you will need to set the MATPLOTLIBDATA environment
58-
variable to point to the install base dir.
59-
6056
Once you have everything above set to your liking, just do the usual
6157
thing
6258

6359
python setup.py build
6460
python setup.py install
65-
61+
6662
WINDOWS
6763

6864
If you don't already have python installed, you may want to consider
@@ -106,7 +102,7 @@ DISTROS: (rpms, apt, fink, osx, freebsd, gentoo, etc)
106102
To build all the backends on a binary linux distro such as redhat,
107103
you need to install a number of the devel libs (and whatever
108104
dependencies they require), I suggest
109-
105+
110106
matplotlib core: zlib, zlib-devel, libpng, libpng-devel,
111107
freetype, freetype-devel, freetype-utils
112108

@@ -134,7 +130,7 @@ DISTROS: (rpms, apt, fink, osx, freebsd, gentoo, etc)
134130
http://www.freshports.org/math/py-matplotlib/
135131

136132
Gentoo
137-
133+
138134
http://www.gentoo-portage.com/dev-python/matplotlib
139135

140136
OS X

MANIFEST.in

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
include API_CHANGES CHANGELOG KNOWN_BUGS INSTALL NUMARRAY_ISSUES
22
include INTERACTIVE TODO
33
include Makefile MANIFEST.in MANIFEST
4-
include matplotlibrc.template matplotlibrc
4+
include matplotlibrc.template matplotlibrc setup.cfg.template
55
include __init__.py setupext.py setup.py setupegg.py makeswig.py
66
include examples/data/*
77
include lib/matplotlib/toolkits
@@ -12,7 +12,8 @@ recursive-include license LICENSE*
1212
recursive-include examples README *.py
1313
prune examples/_tmp_*
1414
recursive-include src *.cpp *.c *.h
15-
recursive-include CXX *.cxx *.hxx *.c
15+
recursive-include CXX *.cxx *.hxx *.c *.h
1616
recursive-include agg23 *
1717
recursive-include lib *
1818
recursive-include swig *
19+
recursive-include ttconv *.cpp *.h

examples/data_helper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def get_two_stock_data():
1515
M1 = resize(M1, (M1.shape[0]/2,2) )
1616

1717
M2 = fromstring( file('data/%s.dat' % ticker2, 'rb').read(), '<d')
18-
M2 = resize(M1, (M2.shape[0]/2,2) )
18+
M2 = resize(M2, (M2.shape[0]/2,2) )
1919

2020
d1, p1 = M1[:,0], M1[:,1]
2121
d2, p2 = M2[:,0], M2[:,1]

examples/loadrec.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pylab import figure, show
33

44
a = mlab.csv2rec('data/msft.csv')
5+
a.sort()
56
print a.dtype
67

78
fig = figure()

examples/text_themes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def f(t):
1717

1818
plot(t1, f(t1), 'bo', t2, f(t2), 'k')
1919
title('Damped exponential decay', font, size='large', color='r')
20-
text(2, 0.65, 'cos(2 pi t) exp(-t)', font, color='k', family='monospace' )
20+
text(2, 0.65, r'$\cos(2 \pi t) \exp(-t)$', color='k')
2121
xlabel('time (s)', font, style='italic')
2222
ylabel('voltage (mV)', font)
2323

lib/matplotlib/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"""
5656
from __future__ import generators
5757

58-
__version__ = '0.91.0'
58+
__version__ = '0.91.1'
5959
__revision__ = '$Revision$'
6060
__date__ = '$Date$'
6161

lib/matplotlib/axes3d.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,10 @@ def get_proj(self):
313313

314314
def mouse_init(self):
315315
self.button_pressed = None
316-
self.figure.canvas.mpl_connect('motion_notify_event', self.on_move)
317-
self.figure.canvas.mpl_connect('button_press_event', self.button_press)
318-
self.figure.canvas.mpl_connect('button_release_event', self.button_release)
316+
if self.figure.canvas != None:
317+
self.figure.canvas.mpl_connect('motion_notify_event', self.on_move)
318+
self.figure.canvas.mpl_connect('button_press_event', self.button_press)
319+
self.figure.canvas.mpl_connect('button_release_event', self.button_release)
319320

320321
def button_press(self, event):
321322
self.button_pressed = event.button

lib/matplotlib/mathtext.py

+30-12
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,18 @@
1616
1717
s = r'$\mathcal{R}\prod_{i=\alpha\mathcal{B}}^\infty a_i\sin(2 \pi f x_i)$'
1818
19-
The fonts \cal, \rm, \it, and \tt are allowed.
19+
Different fonts may be selected:
20+
\mathcal Calligraphic fonts
21+
\mathrm Roman (upright) font
22+
\mathit Italic font
23+
\mathtt Typewriter (monospaced) font, similar to Courier
24+
25+
Additionally, if using the STIX fonts:
26+
\mathbb Blackboard (double-struck) font
27+
\mathcircled Circled characters
28+
\mathfrak Fraktur (Gothic-style) font
29+
\mathscr Script (cursive) font
30+
\mathsf Sans-serif font
2031
2132
The following accents are provided: \hat, \breve, \grave, \bar,
2233
\acute, \tilde, \vec, \dot, \ddot. All of them have the same
@@ -539,10 +550,7 @@ def _get_font(self, font):
539550

540551
cached_font = self._fonts.get(basename)
541552
if cached_font is None:
542-
try:
543-
font = FT2Font(basename)
544-
except RuntimeError:
545-
return None
553+
font = FT2Font(basename)
546554
cached_font = self.CachedFont(font)
547555
self._fonts[basename] = cached_font
548556
self._fonts[font.postscript_name] = cached_font
@@ -650,13 +658,20 @@ def _get_glyph(self, fontname, font_class, sym, fontsize):
650658
if fontname in self.fontmap and latex_to_bakoma.has_key(sym):
651659
basename, num = latex_to_bakoma[sym]
652660
slanted = (basename == "cmmi10") or sym in self._slanted_symbols
653-
cached_font = self._get_font(basename)
654-
symbol_name = cached_font.font.get_glyph_name(num)
655-
num = cached_font.glyphmap[num]
661+
try:
662+
cached_font = self._get_font(basename)
663+
except RuntimeError:
664+
pass
665+
else:
666+
symbol_name = cached_font.font.get_glyph_name(num)
667+
num = cached_font.glyphmap[num]
656668
elif len(sym) == 1:
657669
slanted = (fontname == "it")
658-
cached_font = self._get_font(fontname)
659-
if cached_font is not None:
670+
try:
671+
cached_font = self._get_font(fontname)
672+
except RuntimeError:
673+
pass
674+
else:
660675
num = ord(sym)
661676
gid = cached_font.charmap.get(num)
662677
if gid is not None:
@@ -793,9 +808,12 @@ def _get_glyph(self, fontname, font_class, sym, fontsize):
793808
new_fontname = 'rm'
794809

795810
slanted = (new_fontname == 'it') or sym in self._slanted_symbols
796-
cached_font = self._get_font(new_fontname)
797811
found_symbol = False
798-
if cached_font is not None:
812+
try:
813+
cached_font = self._get_font(new_fontname)
814+
except RuntimeError:
815+
pass
816+
else:
799817
try:
800818
glyphindex = cached_font.charmap[uniindex]
801819
found_symbol = True

0 commit comments

Comments
 (0)