Skip to content

Cannot unpickle polar plot #4068

Closed
Closed

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

  1. added
    Difficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues
    on Feb 6, 2015
  2. pelson commented on Feb 6, 2015

    @pelson
    Member

    Thanks @joergdietrich. This should be a relatively easy fix. If you are interested in having a go, a similar problem was fixed in #3627. Otherwise, we will try to pick this one up before the next release.

  3. added this to the v1.4.x milestone on Feb 6, 2015
  4. modified the milestones: v1.4.x, on Feb 7, 2015
  5. added a commit that references this issue on Mar 25, 2015
    592818a
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