-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
PS backend fails to save polar plot #2828
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
Comments
What version of mpl are you using? |
I'm using Version 1.3.1 as distributed by WinPython and/or http://www.lfd.uci.edu/~gohlke/pythonlibs/. |
Are there already solutions to this problem, I'm having the same problem. It is in the matplotlib that it can't save polar plots.... |
@pelson Smells like something is going wrong in the transform stack. |
@fruitfrisje @rubenvb I can not reproduce this on something close to current master. Can either of you test this using the master branch? |
Try this: phi = linspace(0, 2_pi, 200) It will give the error. (using python 3.3.3 with Spyder 2.3.0beta3) |
@fruitfrisje What version of mpl are you using? ( |
python3 requires that if a class defines __eq__ then in must define __hash__ (so that if a == b then hash(a) == hash(b)). Define 64bit hash by pulling the first 8 characters out of a sha1 hash of the matrix closes matplotlib#2828
I can confirm this on master on 3.3, not on 2.7. This is a side effect of the change in 3 that if a class defines |
Sorry for the late reply (out of office), MPL version 1.3.1. We are now gong to test is in python 2.7.3. Will let you know. Is there already a workaround to solve this class problem? |
I've not tried it, but as a workaround, before you construct the polar plot, try:
This will define a hash function on the affine transform based on the object ID (as it is in Python2) and should fix the problem. @tacaswell also has a fix in the pipeline for v1.4. HTH |
The following error shows up: TypeError: id() takes exactly one argument (0 given) |
Clearly there is always something to learn with Python as I don't fully undersand what the problem is, but replacing that line with:
Should be fine. Anyone care to give me a lesson in Python? |
@pelson the suggested code above works perfect! Thank you very much so far!! A totally other question. Is it also possible to save an excel range to an eps? (the range consists of values and text) |
Base key on the string version of the transform matrix Closes matplotlib#2828
Base key on the string version of the transform matrix Closes matplotlib#2828
Base key on the id of the transform. This maintains the old behavior and does not break the python hashable object model. changed the variable id -> pid so as to not shadow the method `id` Closes matplotlib#2828
Base key on the id of the transform. This maintains the old behavior and does not break the python hashable object model. changed the variable id -> pid so as to not shadow the method `id` Closes matplotlib#2828
Base key on the id of the transform. This maintains the old behavior and does not break the python hashable object model. changed the variable id -> pid so as to not shadow the method `id` Closes matplotlib#2828
This code:
fails with this error:
This cannot be intentional.
The text was updated successfully, but these errors were encountered: