10000 Further tweaks re add_axes. · pelson/matplotlib@7674dcd · GitHub
[go: up one dir, main page]

Skip to content

Commit 7674dcd

Browse files
author
Phil Elson
committed
Further tweaks re add_axes.
1 parent 89053c5 commit 7674dcd

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

lib/matplotlib/axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8439,7 +8439,7 @@ def label_outer(self):
84398439

84408440
_subplot_classes = {}
84418441
def subplot_class_factory(axes_class=None):
8442-
# This makes a new class that inherits from SubclassBase and the
8442+
# This makes a new class that inherits from SubplotBase and the
84438443
# given axes_class (which is assumed to be a subclass of Axes).
84448444
# This is perhaps a little bit roundabout to make a new class on
84458445
# the fly like this, but it means that a new Subplot class does

lib/matplotlib/figure.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -703,16 +703,15 @@ def add_axes(self, *args, **kwargs):
703703
projection = 'polar'
704704

705705
if isinstance(projection, basestring) or projection is None:
706-
projection_class = get_projection_class(projection)
706+
a = projection_factory(projection, self, rect, **kwargs)
707707
elif hasattr(projection, '_as_mpl_axes'):
708708
projection_class, extra_kwargs = projection._as_mpl_axes()
709709
kwargs.update(**extra_kwargs)
710+
a = projection_class(self, rect, **kwargs)
710711
else:
711712
TypeError('projection must be a string, None or implement a '
712713
'_as_mpl_axes method. Got %r' % projection)
713714

714-
a = projection_factory(projection, self, rect, **kwargs)
715-
716715
self._axstack.add(key, a)
717716
self.sca(a)
718717
return a

0 commit comments

Comments
 (0)
0