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 bb25e5e commit 2f186adCopy full SHA for 2f186ad
1 file changed
lib/matplotlib/backends/backend_qt5.py
@@ -268,8 +268,9 @@ def _update_figure_dpi(self):
268
@property
269
def _dpi_ratio(self):
270
# Not available on Qt4 or some older Qt5.
271
- try:
272
- return self.devicePixelRatio() or 1 # can be 0 in rare cases
+ try:
+ # self.devicePixelRatio() returns 0 in rare cases
273
+ return self.devicePixelRatio() or 1
274
except AttributeError:
275
return 1
276
0 commit comments