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

Skip to content

Commit 999ac71

Browse files
committed
No need to remove figure.show when pickling.
We stopped monkeypatching figure.show on the figure instance in 51ffd4b.
1 parent dcbb524 commit 999ac71

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/matplotlib/figure.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,7 +1622,7 @@ def _break_share_link(ax, grouper):
16221622
return None
16231623

16241624
self._axstack.remove(ax)
1625-
self._axobservers.process("_on_axes_change", self)
1625+
self._axobservers.process("_axes_change_event", self)
16261626
self.stale = True
16271627

16281628
last_ax = _break_share_link(ax, ax._shared_y_axes)
@@ -1918,7 +1918,7 @@ def gca(self, **kwargs):
19181918
def sca(self, a):
19191919
"""Set the current axes to be *a* and return *a*."""
19201920
self._axstack.bubble(a)
1921-
self._axobservers.process("_on_axes_change", self)
1921+
self._axobservers.process("_axes_change_event", self)
19221922
return a
19231923

19241924
def _gci(self):
@@ -1961,7 +1961,7 @@ def __getstate__(self):
19611961
# The canvas cannot currently be pickled, but this has the benefit
19621962
# of meaning that a figure can be detached from one canvas, and
19631963
# re-attached to another.
1964-
for attr_to_pop in ('show', 'canvas', '_cachedRenderer'):
1964+
for attr_to_pop in ('canvas', '_cachedRenderer'):
19651965
state.pop(attr_to_pop, None)
19661966

19671967
# add version information to the state
@@ -2028,7 +2028,7 @@ def add_axobserver(self, func):
20282028
"""Whenever the axes state change, ``func(self)`` will be called."""
20292029
# Connect a wrapper lambda and not func itself, to avoid it being
20302030
# weakref-collected.
2031-
self._axobservers.connect("_on_axes_change", lambda arg: func(arg))
2031+
self._axobservers.connect("_axes_change_event", lambda arg: func(arg))
20322032

20332033
def savefig(self, fname, *, transparent=None, **kwargs):
20342034
"""

0 commit comments

Comments
 (0)