Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overloaded _make_twin_axes on LocateableAxesBase #2515

Merged
merged 1 commit into from Dec 9, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/mpl_toolkits/axes_grid1/axes_divider.py
Expand Up @@ -896,6 +896,15 @@ def draw(self, renderer=None, inframe=False):

self._axes_class.draw(self, renderer, inframe)

def _make_twin_axes(self, *kl, **kwargs):
"""
Need to overload so that twinx/twiny will work with
these axes.
"""
ax2 = type(self)(self.figure, self.get_position(True), *kl, **kwargs)
ax2.set_axes_locator(self.get_axes_locator())
self.figure.add_axes(ax2)
return ax2


_locatableaxes_classes = {}
Expand Down