[R] text bubble (rectangle)?

From: ivo welch <ivowel_at_gmail.com>
Date: Sun 04 Jun 2006 - 12:12:23 EST

Dear R wizards: sorry to bug everyone twice in one day.

I would like to annotate my graph by putting text strings into rectangle boxes with a little cartoon-like bubble with a lid pointing to a specific location. I can draw some sort of bubble-with-lid using the R primitives. (has anyone done something like this already?)

the problem where I am stuck is that the width of the rectangle must depend on the length and font of my string. is there a way to obtain the lower left and upper right location of a text string that R drew? (this would be good return values for the text() function, wouldn't it?)

  bubble.annotate <- function( x, y, xlid, ylid, textstring ) { HELP }   bubble.annotate( 19871010, 20, 19871019, 13, "Black Monday" );

[and thanks, gabor, for explaining the ifelse tricks with dates to me.]



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 Sun Jun 04 12:19:00 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sun 04 Jun 2006 - 18:10:36 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.