Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 88d4ec5

Browse files
committed
Refine twin position fix to preserve layout participation
1 parent d9ef7af commit 88d4ec5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/matplotlib/axes/_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4657,8 +4657,8 @@ def _make_twin_axes(self, *args, **kwargs):
46574657
twin.set_zorder(self.zorder)
46584658

46594659
self._twinned_axes.join(self, twin)
4660-
4661-
twin.set_position(self.get_position())
4660+
if not self.get_in_layout():
4661+
twin.set_position(self.get_position())
46624662

46634663
return twin
46644664

0 commit comments

Comments
 (0)