8000 Merge pull request #22838 from meeseeksmachine/auto-backport-of-pr-22… · matplotlib/matplotlib@be101a3 · GitHub
[go: up one dir, main page]

Skip to content

Commit be101a3

Browse files
authored
Merge pull request #22838 from meeseeksmachine/auto-backport-of-pr-22806-on-v3.5.x
Backport PR #22806 on branch v3.5.x (FIX: callback for subfigure uses parent)
2 parents c661729 + f399844 commit be101a3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/figure.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,6 @@ def clear(self, keep_observers=False):
946946
a gui widget is tracking the Axes in the figure.
947947
"""
948948
self.suppressComposite = None
949-
self.callbacks = cbook.CallbackRegistry()
950949

951950
# first clear the axes in any subfigures
952951
for subfig in self.subfigs:
@@ -2051,6 +2050,8 @@ def __init__(self, parent, subplotspec, *,
20512050
self._subplotspec = subplotspec
20522051
self._parent = parent
20532052
self.figure = parent.figure
2053+
self.callbacks = parent.callbacks
2054+
20542055
# subfigures use the parent axstack
20552056
self._axstack = parent._axstack
20562057
self.subplotpars = parent.subplotpars

0 commit comments

Comments
 (0)
< 3091 svg aria-hidden="true" version="1.1" viewBox="0 0 340 84" xmlns="http://www.w3.org/2000/svg" class="Box-sc-g0xbh4-0 hqtbbn">
0