Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit0476435

Browse files
committed
feat: axes class and kwargs for twinx and twiny
1 parentb7c6197 commit0476435

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
ifnot {"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
ifnot {"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)

[8]ページ先頭

©2009-2025 Movatter.jp