[R] Text in Boxes?

From: David Reitter <david.reitter_at_gmail.com>
Date: Fri 07 Oct 2005 - 20:26:09 EST

It's probably a beginner's question:

How do I show text in boxes?
That is, can I specify a background color for text output with text() ?

The following doesn't work as I would expect:

text(labels="123", 50, 0.5, bg="green")

I've experimented with legend(),which will make the box too wide, and also with rect(), which doesn't know the extent of the text shown.

The concrete application for this is are multiple time series shown in different colors, and I'd like to show the boxed text (with the appropriate colors) right next to (the maximum of) each time series in the diagram. Color text is hard to read, so I'd like nice colored boxes around black text.

Thanks for your help :)

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Oct 07 20:29:50 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:38 EST