[Rd] Support for high DPI 4K screens
Brian G. Peterson
brian at braverock.com
Sat Sep 5 15:56:18 CEST 2015
On 09/05/2015 06:46 AM, Tom Wenseleers wrote:
> I was recently testing R and RStudio on a high dpi 4K monitor under
> Windows and noticed that the plot window cannot be scaled or zoomed
> without affecting the relative sizing of all plot elements (line
> widths, font sizes, legend spacing etc). RStudio seems to try to
> overcome this by enabling dpi scaling for the plot window on high dpi
> screens, but this results in really fuzzy text and graphics (e.g.
> causing colour fringing when using Cleartype). This made me wonder if
> the assumed dpi of the screen could perhaps be set using some global
> option, so that all graphics could be made to scale their contents in
> a correct way, without affecting the size relative to the size of the
> plot window (I think now it is always assumed to be 72 dpi)? I
> recently asked a related question re how to scale R graphics
> proportionally to the size of the plot window on Stackoverflow,
> but nobody seemed to be able to come up with a good answer/solution.
> This made me wonder if there could perhaps be some low-level solution
> to this?
R-help or RStudio support seem more appropriate for this?
'The correct way' is a very subjective term. I really don't want R or
any other application or operating system assuming that I bought a whole
bunch of expensive 4k displays for smoother lines. I bought them for
We routinely use R and RStudio on 4k displays, I'm doing so right now.
The problem you are likely having is an old version of Windows, and has
little or nothing to do with R or RStudio. Windows 8 and higher have
extensive application scaling support.
Of course, Macs and Linux have good scaling support also, and you get
better R performance on Macs and Linux as well.
Even on Windows, we typically run almost all our applications on 4k
displays at native resolution, and only change title bar and menu
scaling based on distance to the screen. We also use all those pixels.
Your use cases, of course, may vary. Which, in part, is why R has so
much control over the types of graphic devices you create, and how you
choose to control them.
Brian G. Peterson
More information about the R-devel