Reputation: 157
When I start an R session, the xscale
and yscale
values of the initial viewport are set automatically by the grid package. I would like to understand the relationship between these values and the corresponding screen dimensions in pixels.
These are the results I get when I run the same code from RStudio with reprex
:
library(grid)
convertY(unit(0, 'npc'), "native")
#> [1] 360native
Created on 2024-04-24 with reprex v2.0.2
and from the R app:
library(grid)
convertY(unit(0, 'npc'), "native")
#> [1] 504native
both immediately after starting an a new R session.
What I would like to know is :
Upvotes: 1
Views: 65