File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,12 @@ def test_simple():
115
115
# recursive_pickle(ax, 'figure')
116
116
# pickle.dump(ax, BytesIO(), pickle.HIGHEST_PROTOCOL)
117
117
118
+ fig = plt .figure ()
119
+ plt .plot (range (10 ))
120
+ fig .tight_layout (pad = 0.3 )
121
+ recursive_pickle (fig )
122
+ pickle .dump (fig , BytesIO (), pickle .HIGHEST_PROTOCOL )
123
+
118
124
119
125
@image_comparison (baseline_images = ['multi_pickle' ],
120
126
extensions = ['png' ], remove_text = True )
Original file line number Diff line number Diff line change @@ -197,6 +197,12 @@ def __init__(self,
197
197
self .update (kwargs )
198
198
#self.set_bbox(dict(pad=0))
199
199
200
+ def __getstate__ (self ):
201
+ d = super (Text , self ).__getstate__ ()
202
+ # remove the cached _renderer (if it exists)
203
+ d ['_renderer' ] = None
204
+ return d
205
+
200
206
def contains (self , mouseevent ):
201
207
"""Test whether the mouse event occurred in the patch.
202
208
You can’t perform that action at this time.
0 commit comments