Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02e89e6 commit d2a0a0bCopy full SHA for d2a0a0b
1 file changed
lib/matplotlib/backends/backend_qt5.py
@@ -588,7 +588,8 @@ def _icon(self, name):
588
if is_pyqt5():
589
name = name.replace('.png', '_large.png')
590
pm = QtGui.QPixmap(os.path.join(self.basedir, name))
591
- pm.setDevicePixelRatio(self.canvas._dpi_ratio)
+ if hasattr(pm, 'setDevicePixelRatio'):
592
+ pm.setDevicePixelRatio(self.canvas._dpi_ratio)
593
return QtGui.QIcon(pm)
594
595
def _init_toolbar(self):
0 commit comments