Commit 5b95065
committed
FIX: restore creating new axes via plt.subplot with different kwargs
This adds a small amount of additional state to the Axes created via
Figure.add_axes and Figure.add_subplot (which the other Axes creation
methods eventually funnel through) to track the projection class and
processed kwargs.
We then use that state in `pyplot.subplot` to determine if we should
re-use an Axes found at a given position or create a new one (and
implicitly destroy the existing one).
closes #194321 parent 56d9e7c commit 5b95065
3 files changed
Lines changed: 32 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
| 571 | + | |
571 | 572 | | |
572 | 573 | | |
573 | 574 | | |
| |||
576 | 577 | | |
577 | 578 | | |
578 | 579 | | |
579 | | - | |
| 580 | + | |
580 | 581 | | |
581 | 582 | | |
582 | 583 | | |
583 | | - | |
584 | | - | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
585 | 587 | | |
586 | 588 | | |
587 | 589 | | |
| |||
694 | 696 | | |
695 | 697 | | |
696 | 698 | | |
| 699 | + | |
697 | 700 | | |
698 | 701 | | |
699 | 702 | | |
| |||
706 | 709 | | |
707 | 710 | | |
708 | 711 | | |
709 | | - | |
| 712 | + | |
710 | 713 | | |
711 | | - | |
712 | | - | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
713 | 717 | | |
714 | | - | |
| 718 | + | |
715 | 719 | | |
716 | 720 | | |
717 | 721 | | |
718 | 722 | | |
719 | 723 | | |
| 724 | + | |
| 725 | + | |
720 | 726 | | |
721 | 727 | | |
722 | 728 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1229 | 1229 | | |
1230 | 1230 | | |
1231 | 1231 | | |
1232 | | - | |
1233 | | - | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
1234 | 1235 | | |
1235 | 1236 | | |
1236 | 1237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1010 | 1010 | | |
1011 | 1011 | | |
1012 | 1012 | | |
1013 | | - | |
| 1013 | + | |
1014 | 1014 | | |
1015 | 1015 | | |
1016 | 1016 | | |
1017 | 1017 | | |
| 1018 | + | |
1018 | 1019 | | |
| 1020 | + | |
1019 | 1021 | | |
1020 | 1022 | | |
1021 | 1023 | | |
1022 | | - | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
1023 | 1031 | | |
1024 | | - | |
| 1032 | + | |
| 1033 | + | |
1025 | 1034 | | |
1026 | 1035 | | |
1027 | 1036 | | |
| |||
1055 | 1064 | | |
1056 | 1065 | | |
1057 | 1066 | | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
0 commit comments