[R] problem understanding grid coordinate systems

Johannes Huesing johannes at huesing.name
Sat Jul 11 06:36:38 CEST 2015


According to "R Graphics" by Paul Murrell, the coordinates that were used for the
most recent lattics plot can be retrieved with "native" units.

I have difficulties to access these coordinates. The following code
renders the following results:

> library(grid)
> library(lattice)
> pl <- xyplot(1:10 ~ 10:1)
> print(pl)
> convertX(unit(.9, "npc"), "native")
[1] 605.7native

  R version 3.0.2 (2013-09-25)

I had expected something around 9.5 in native coordinates. The result
looks more like raw coordinates, which might be what is meant by
native. Which coordinate system do I have to address instead?



-- 
Johannes Hüsing



More information about the R-help mailing list