Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1a0021b

Browse filesBrowse files
author
Phil Elson
committed
Class projection support added.
1 parent d6ec786 commit 1a0021b
Copy full SHA for 1a0021b

File tree

Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed

‎lib/matplotlib/figure.py

Copy file name to clipboardExpand all lines: lib/matplotlib/figure.py
+6-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.