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

Skip to content

Commit 5bd4711

Browse files
committed
MNT: make figure use base-class __getstate__
This make sure that the artist-level unpickable attributes are picked off.
1 parent 54e04d3 commit 5bd4711

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/figure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,7 @@ def _gci(self):
13601360
return None
13611361

13621362
def __getstate__(self):
1363-
state = self.__dict__.copy()
1363+
state = super(Figure, self).__getstate__()
13641364
# the axobservers cannot currently be pickled.
13651365
# Additionally, the canvas cannot currently be pickled, but this has
13661366
# the benefit of meaning that a figure can be detached from one canvas,

0 commit comments

Comments
 (0)