Togaware DATA MINING
Desktop Survival Guide
by Graham Williams
Google

Other Graphic Elements

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)



Copyright © 2004-2006 Graham.Williams@togaware.com
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware.