-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
'QPixmap' object has no attribute 'setDevicePixelRatio' #8562
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
I made it work after installing many packages but I doubt any of them had a real effect on it.
This issue may be related to: #3466 |
This is most likely a duplicate of the issue fixed and reported in #8559 It will affect qt4 and old version of qt5 |
The |
Thanks for the follow up. I actually installed from sources both PyQt4+SIP (and even PySide) and PyQt5.
Then it works but Qt4Agg and PySide still reproduce the error stated before. Hope this helps other people. |
But I saw there was a fix for it, good to see :) |
Report
Summary
I was trying to use networkx to draw some graphs but matplotlib fails. So I tested some actual matplotlib examples without including networkx related code and I reproduced the same error. I suspect it may be related to Qt but cannot be sure. The error states as:
Code for reproduction
I am using python 2.7. The code I used was:
but it already fails in this line:
plt.plot(X,C)
Expected outcome
Expected outcome is this picture:
Matplotlib version
Qmake:
System info:
Matplotlib info:
I cannot reproduce all the commands I issued but can give an outline.
I issued these commands:
sudo apt-get build-dep python-matplotlib
sudo pip install matplotlib
Full error trace:
The text was updated successfully, but these errors were encountered: