Cannot unpickle polar plot · Issue #4068 · matplotlib/matplotlib · GitHub
Skip to content

Cannot unpickle polar plot #4068

Description

@joergdietrich

I create the polar plot example from http://matplotlib.org/examples/pie_and_polar_charts/polar_scatter_demo.html

Then

fig = plt.gcf()
pf = pickle.dumps(fig)
f2 = pickle.loads(pf)

throws the following exception:

/home/joerg/applications/anaconda3/lib/python3.4/site-packages/matplotlib/transforms.py in __setstate__(self, data_dict)
    116         self.__dict__ = data_dict
    117         # turn the normal dictionary back into a WeakValueDictionary
--> 118         self._parents = WeakValueDictionary(self._parents)
    119 
    120     def __copy__(self, *args):

AttributeError: 'PolarAffine' object has no attribute '_parents'

Note that this is separate from issue #3483 in that plt.ioff() before unpickling does not work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions