grid.text {grid} | R Documentation |
This function draws a piece of text.
grid.text(label, x = unit(0.5, "npc"), y = unit(0.5, "npc"), just = "centre", rot = 0, check.overlap = FALSE, default.units = "npc", gp=gpar(), draw = TRUE, vp = NULL)
label |
A vector of strings to draw. |
x |
A numeric vector or unit object specifying x-values. |
y |
A numeric vector or unit object specifying y-values. |
just |
The justification of the text about its (x, y) location. If two values are given, the first specifies horizontal justification and the second specifies vertical justification. |
rot |
The angle to rotate the text. |
check.overlap |
A logical value to indicate whether to check for and omit overlapping text. |
default.units |
A string indicating the default units to use
if x or y
are only given as numeric vectors. |
gp |
An object of class gpar , typically the output
from a call to the function gpar . This is basically
a list of graphical parameter settings. |
draw |
A logical value indicating whether graphics output should be produced. |
vp |
A Grid viewport object (or NULL). |
The "grob"
object contains an object of class "text"
.
An object of class "grob"
.
Paul Murrell
grid.newpage() x <- runif(20) y <- runif(20) rot <- runif(20, 0, 360) grid.text("SOMETHING NICE AND BIG", x=x, y=y, rot=rot, gp=gpar(fontsize=20, col="grey")) grid.text("SOMETHING NICE AND BIG", x=x, y=y, rot=rot, gp=gpar(fontsize=20), check=TRUE)