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 ______________________________________________ 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