Commit d9ef7af
committed
Fix #21409: Make twin axes inherit parent position
When set_position() is called before twinx() or twiny(),
the twin axes are created using the original subplot
position instead of the current position of the parent.
Set the twin position from the parent in _make_twin_axes
so that twins start aligned with the parent axes.
Add a regression test covering both twinx() and twiny().1 parent 726af38 commit d9ef7af
2 files changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4657 | 4657 | | |
4658 | 4658 | | |
4659 | 4659 | | |
| 4660 | + | |
| 4661 | + | |
| 4662 | + | |
4660 | 4663 | | |
4661 | 4664 | | |
4662 | 4665 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
480 | 490 | | |
481 | 491 | | |
482 | 492 | | |
| |||
0 commit comments