Skip to content

Commit

Permalink
SubplotBase._make_twin_axes always creates a new subplot instance. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
leejjoon committed Apr 30, 2013
1 parent 3b972d6 commit e37e868
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/matplotlib/axes.py
Expand Up @@ -9283,7 +9283,14 @@ def _make_twin_axes(self, *kl, **kwargs):
"""
make a twinx axes of self. This is used for twinx and twiny.
"""
ax2 = self.figure.add_subplot(self.get_subplotspec(), *kl, **kwargs)
from matplotlib.projections import process_projection_requirements
kl = (self.get_subplotspec(),) + kl
projection_class, kwargs, key = process_projection_requirements(
self.figure, *kl, **kwargs)

ax2 = subplot_class_factory(projection_class)(self.figure,
*kl, **kwargs)
self.figure.add_subplot(ax2)
return ax2

_subplot_classes = {}
Expand Down

0 comments on commit e37e868

Please sign in to comment.