DATA MINING
Desktop Survival Guide by Graham Williams |
|||||
Place onto a plot text in a rect box with
background shading, using strwidth to determine the
rectangles coordinates:
text <- "Some Text"; x <- 10; y <- 10 xpad <- 0.1; ypad <- 1.0; bg="wheat" w <- strwidth(text) + xpad*strwidth(text) h <- strheight(text) + ypad*strheight(text) rect(x-w/2, y-h/2, x+w/2, y+h/2, col=bg) text(x, y, text) |