A quick question that I can\'t find answer on the web (or Wickham\'s book):
What is the unit of the size argument in ggplot2
? For example, geom_tex
The 'ggplot2' package, like 'lattice' before it, is built on the grid
package. You can get the available units at:
?grid::unit
?grid::convertX
?grid::convertY
grid::convertX(grid::unit(72.27, "points"), "inches")
(I use the formalism pkg::func
because in most cases grid
is loaded a a NAMESPACE but not attached when either lattice
or `ggplot2 are loaded.)
I earlier posted a comment that I later deleted saying that size
was in points. I did so after seeing that the size of the text with size=10
was roughly 10 mm. The "magic" number mentioned by agstudy is in fact within 1% of:
as.numeric(grid::convertX(grid::unit(1, "points"), "mm"))
#[1] 0.3514598
0.352777778/.Last.value
#[1] 1.00375