8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c01373c commit 4e0b60cCopy full SHA for 4e0b60c
lib/matplotlib/figure.py
@@ -105,6 +105,17 @@ def current(self):
105
"""Return the active axes, or None if the stack is empty."""
106
return max(self._axes, key=self._axes.__getitem__, default=None)
107
108
+ def __getstate__(self):
109
+ return {
110
+ **vars(self),
111
+ "_counter": max(self._axes.values(), default=0)
112
+ }
113
+
114
+ def __setstate__(self, state):
115
+ next_counter = state.pop('_counter')
116
+ vars(self).update(state)
117
+ self._counter = itertools.count(next_counter)
118
119
120
class SubplotParams:
121
"""
0 commit comments