From brian at braverock.com  Sat Sep  5 15:56:18 2015
From: brian at braverock.com (Brian G. Peterson)
Date: Sat, 05 Sep 2015 08:56:18 -0500
Subject: [Rd] Support for high DPI 4K screens
In-Reply-To: <37EFC97028F3E44082ACC5CBEC00563032C4B905@ICTS-S-MBX14.luna.kuleuven.be>
References: <37EFC97028F3E44082ACC5CBEC00563032C4B905@ICTS-S-MBX14.luna.kuleuven.be>
Message-ID: <55EAF482.30505@braverock.com>

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,
> http://stackoverflow.com/questions/31381066/r-function-to-make-plot-symbols-line-widths-and-text-in-ggplot2-lattice-and-b/32412384#32412384
> 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 
pixel count.

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.

Regards,

Brian

-- 
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock



[Rd] Support for high DPI 4K screens
Brian G. Peterson