Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to pickle.load an AxesSubplot object #3987

Closed
sektoid0 opened this issue Jan 9, 2015 · 0 comments
Closed

unable to pickle.load an AxesSubplot object #3987

sektoid0 opened this issue Jan 9, 2015 · 0 comments

Comments

@sektoid0
Copy link

sektoid0 commented Jan 9, 2015

Python 2.7.9 :: Anaconda 2.1.0 (64-bit)
Matplotlib 1.4.0

Example code from http://stackoverflow.com/questions/7290370/store-and-reload-matplotlib-pyplot-object

Getting a following exception on pickle load:


AttributeError Traceback (most recent call last)
in ()
2 import pickle
3
----> 4 ax = pickle.load(file('myplot.pickle', 'rb'))
5 plt.show()

/home/anaconda/envs/py27/lib/python2.7/pickle.pyc in load(file)
1376
1377 def load(file):
-> 1378 return Unpickler(file).load()
1379
1380 def loads(str):

/home/anaconda/envs/py27/lib/python2.7/pickle.pyc in load(self)
856 while 1:
857 key = read(1)
--> 858 dispatchkey
859 except _Stop, stopinst:
860 return stopinst.value

/home/anaconda/envs/py27/lib/python2.7/pickle.pyc in load_build(self)
1215 setstate = getattr(inst, "setstate", None)
1216 if setstate:
-> 1217 setstate(state)
1218 return
1219 slotstate = None

/home/anaconda/envs/py27/lib/python2.7/site-packages/matplotlib/figure.pyc in setstate(self, state)
1343 allnums = plt.get_fignums()
1344 num = max(allnums) + 1 if allnums else 1
-> 1345 mgr = plt._backend_mod.new_figure_manager_given_figure(num, self)
1346
1347 # XXX The following is a copy and paste from pyplot. Consider

AttributeError: 'module' object has no attribute 'new_figure_manager_given_figure'

@sektoid0 sektoid0 closed this as completed Jan 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant