[R] text bubble (rectangle)?
ivo welch
ivowel at gmail.com
Sun Jun 4 04:12:23 CEST 2006
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.]
regards,
/iaw
More information about the R-help
mailing list