conda update spyder
(or pip
, if not using Anaconda)jupyter qtconsole
(if console-related)spyder --reset
import numpy as np
from matplotlib import pyplot as pp
pp.figure()
pp.plot(np.arange(100), 'k')
pp.grid()
%config InlineBackend.figure_format = 'retina'
Expected the output to be smooth high quality DPI inline plot after change in inline figure format but instead blurry jagged low quality version is displayed as before
Jupyter notebook run shows correct smooth plot after inline figure format change
IPython >=4.0 : 7.4.0 (OK)
cython >=0.21 : 0.29.6 (OK)
jedi >=0.9.0 : 0.13.3 (OK)
matplotlib >=2.0.0: 3.0.3 (OK)
nbconvert >=4.0 : 5.4.1 (OK)
numpy >=1.7 : 1.16.2 (OK)
pandas >=0.13.1 : 0.24.2 (OK)
psutil >=0.3 : 5.6.1 (OK)
pycodestyle >=2.3 : 2.5.0 (OK)
pyflakes >=0.6.0 : 2.1.1 (OK)
pygments >=2.0 : 2.3.1 (OK)
pylint >=0.25 : 2.3.1 (OK)
qtconsole >=4.2.0 : 4.4.3 (OK)
rope >=0.9.4 : 0.14.0 (OK)
sphinx >=0.6.6 : 2.0.1 (OK)
sympy >=0.7.3 : 1.4 (OK)
@dalthviz, please take a look at this one. We need to add a new option in the Inline backend section of our preferences called
[ ] Display images in high resolution
And pass that option to the kernel.
using Kubuntu 18.10 installation there is no such a problem even with default png backend inline format
Python 3.6.7 64-bit | Qt 5.12.2 | PyQt5 5.12.1 | Linux 4.18.0-17-generic
Then I'd say it's a Qt issue and not an Spyder one.
Display images in high resolution
If this is still a correction needed, why not make it a default (instead of adding the option?)
Because in non-HDPI screens plots will look huge.
Because in non-HDPI screens plots will look huge.
Got it thanks!
Is there an overall High DPI setting for spyder? Could we link to that one?
There's what Rafa added in
Preferences > General > Screen resolution
But linking both things (a change in that option with a change in the inline backend) is not work for Spyder 3.
Should we leave this for Spyder 4? It's not that critical.
Should we leave this for Spyder 4? It's not that critical.
Yes, I believe is the right place to fix it.
Then I'd say it's a Qt issue and not an Spyder one.
There are similar issues with Gwenview PNG images opened in Kubuntu 18.10 HIDPI monitor with desktop scaled to fractional scale as in Spyder running on Mint 19.1. PNG images in Gwenview once opened looked exactly blurry and jagged and that issue is known and reported.
@goanpeca, do you need to activate our option in
Preferences > General > Screen resolution
in your Retina Display Mac for things to look good there?
That's to know if Qt adjusts automatically to HiDPI in some cases (like macOS).
If you don't need to activate that option, then we really need to add another option to the console preferences (as proposed at the beginning) to tell the kernel that Spyder is running in a HiDPI screen.
Some useful links:
Notes:
%config InlineBackend.figure_format = <option>
.IPython Console
should be migrated to not have multiple preferences for the same thing - format figure of the inline backend).@dalthviz, the work you're planning to do to solve this one could be unnecessary if PR #12219 is merged in the future. So please take a look at that work before starting this one.
Most helpful comment
@dalthviz, please take a look at this one. We need to add a new option in the Inline backend section of our preferences called
And pass that option to the kernel.