Commit 0f4ec9a
committed
FIX: do not replace the Axes._children list object
Each Artist keeps a reference to `Axes._children.remove` as
`art._remove_method`. If we replace the `_children` instance on the Axes with
a different list instance the Artists will not be updated and their remove
method will refer to the wrong list. This will cause subsequent failures on
the next draw because on remove we reset the `art.axes` and `art.figure` to
None.
xref https://discourse.matplotlib.org/t/host-subplot-and-artist-remove/233741 parent a5f5af3 commit 0f4ec9a
File tree
2 files changed
+12
-1
lines changed- lib/mpl_toolkits/axes_grid1
- tests
2 files changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
684 | 684 | | |
685 | 685 | | |
686 | 686 | | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
0 commit comments