Skip to content
Prev 390898 / 398506 Next

dev.size() does not return correct size on 4K screen

Thank you, Peter!


 From xdpyinfo I got

screen #0:
 ? dimensions:??? 5120x2880 pixels (903x508 millimeters)
 ? resolution:??? 144x144 dots per inch

According to these specs my screen should have a sqrt((5120/144)^2 + 
(2880/144)^2) = 40.8" diagonal.

However, in practice it is 27", so that perfectly explains the 1.5 
factor difference.


In RStudio, dev.size() is not equal to par("fin"), which caused the 
problem for me. I the R terminal, these two are equal. I'll post this in 
the RStudio issue list.


Best,

Martijn
On 3/2/22 23:11, peter dalgaard wrote: