[R] problem understanding grid coordinate systems

Johannes Huesing johannes at huesing.name
Thu Jul 9 07:44:09 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
                _                           
platform       i686-pc-linux-gnu           
arch           i686
os             linux-gnu                   
system         i686, linux-gnu             
status         
major          3                           
minor          0.2
year           2013                        
month          09
day            25                          
svn rev        63987
language       R                           
version.string R version 3.0.2 (2013-09-25)
nickname       Frisbee Sailing

I had expected something around 9.5 in native coordinates. Which coordinate
system do I have to address instead?

--
Johannes Hüsing



More information about the R-help mailing list