Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1a0021b

Browse files
author
Phil Elson
committed
Class projection support added.
1 parent d6ec786 commit 1a0021b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/matplotlib/figure.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,12 @@ def add_subplot(self, *args, **kwargs):
758758
projection)
759759
projection = 'polar'
760760

761-
projection_class = get_projection_class(projection)
761+
if isinstance(projection, basestring) or projection is None:
762+
projection_class = get_projection_class(projection)
763+
else:
764+
projection_class, extra_kwargs = projection._as_mpl_axes()
765+
# XXX Do the extra arguments need to be hashable???
766+
kwargs.update(**extra_kwargs)
762767

763768
# Remake the key without projection kwargs:
764769
key = self._make_key(*args, **kwargs)

0 commit comments

Comments
 (0)