8000 figure/subplot and font_manager bugfixes · smunix/matplotlib@077fb39 · GitHub
[go: up one dir, main page]

Skip to content

Commit 077fb39

Browse files
committed
figure/subplot and font_manager bugfixes
svn path=/trunk/matplotlib/; revision=6559
1 parent 29ad6a7 commit 077fb39

File tree

4 files changed

+17
-14
lines changed

4 files changed

+17
-14
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2008-12-10 Added Michael's font_manager fix and Jae-Joon's
2+
figure/subplot fix. Bumped version number to 0.98.5 - JDH
3+
14
================================================================= 2008-12-09 Released 0.98.4 at svn r6536
25

36
2008-12-08 Added mdehoon's native macosx backend from sf patch 2179017 - JDH

lib/matplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"""
9090
from __future__ import generators
9191

92-
__version__ = '0.98.4'
92+
__version__ = '0.98.5rc'
9393
__revision__ = '$Revision$'
9494
__date__ = '$Date$'
9595

lib/matplotlib/figure.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -676,21 +676,21 @@ def add_subplot(self, *args, **kwargs):
676676

677677
projection_class = get_projection_class(projection)
678678

679-
key = self._make_key(*args, **kwargs)
680-
if key in self._seen:
681-
ax = self._seen[key]
682-
if isinstance(ax, projection_class):
683-
self.sca(ax)
684-
return ax
685-
else:
686-
self.axes.remove(ax)
687-
self._axstack.remove(ax)
688-
689-
a = subplot_class_factory(projection_class)(self, *args, **kwargs)
679+
key = self._make_key(*args, **kwargs)
680+
if key in self._seen:
681+
ax = self._seen[key]
682+
if isinstance(ax, projection_class):
683+
self.sca(ax)
684+
return ax
685+
else:
686+
self.axes.remove(ax)
687+
self._axstack.remove(ax)
688+
689+
a = subplot_class_factory(projection_class)(self, *args, **kwargs)
690+
self._seen[key] = a
690691
self.axes.append(a)
691692
self._axstack.push(a)
692693
self.sca(a)
693-
self._seen[key] = a
694694
return a
695695
add_subplot.__doc__ = dedent(add_subplot.__doc__) % {
696696
'list': ", ".join(get_projection_names()),

lib/matplotlib/font_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ def score_family(self, families, family2):
10681068
options = rcParams['font.' + family1]
10691069
if family2 in options:
10701070
idx = options.index(family2)
1071-
return 0.1
1071+
return 0.1 * (float(idx) / len(options))
10721072
elif family1.lower() == family2.lower():
10731073
return 0.0
10741074
return 1.0

0 commit comments

Comments
 (0)
0