8000 feat: axes class and kwargs for twinx and twiny · matplotlib/matplotlib@0476435 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0476435

Browse files
committed
feat: axes class and kwargs for twinx and twiny
1 parent b7c6197 commit 0476435

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4623,7 +4623,7 @@ def twinx(self, **kwargs):
46234623
"""
46244624
if not {"projection", "polar", "axes_class"}.intersection(kwargs):
46254625
kwargs["axes_class"] = type(self)
4626-
ax2 = self._make_twin_axes(sharex=self, **kwargs)
4626+
ax2 = self._make_twin_axes(sharex=self, axes_class=type(self), **kwargs)
46274627
ax2.yaxis.tick_right()
46284628
ax2.yaxis.set_label_position('right')
46294629
ax2.yaxis.set_offset_position('right')
@@ -4661,7 +4661,7 @@ def twiny(self, **kwargs):
46614661
"""
46624662
if not {"projection", "polar", "axes_class"}.intersection(kwargs):
46634663
kwargs["axes_class"] = type(self)
4664-
ax2 = self._make_twin_axes(sharey=self, **kwargs)
4664+
ax2 = self._make_twin_axes(sharey=self, axes_class=type(self), **kwargs)
46654665
ax2.xaxis.tick_top()
46664666
ax2.xaxis.set_label_position('top')
46674667
ax2.set_autoscaley_on(self.get_autoscaley_on())

0 commit comments

Comments
 (0)
0