Hello R people Is there a way to get the coordinates of the text region (coordinates of the four corners for example) when using the text function? I'm looking for a way that does not make use of interactive function like locator. My goal is to determine the position of other structures in a graphic so that they don't overlap with the text. Thanks Francois Rousseu [[alternative HTML version deleted]]
On Mar 26, 2011, at 8:39 PM, Francois Rousseu wrote:> > Hello R people > > Is there a way to get the coordinates of the text region > (coordinates of the four corners for example)What "text region" are you talking about?> when using the text function? I'm looking for a way that does not > make use of interactive function like locator. My goal is to > determine the position of other structures in a graphic so that they > don't overlap with the text.The plotrix package and the rms package have functions for avoiding plotted points but you seem to be looking for something else. -- David Winsemius, MD West Hartford, CT
Look at the strwidth and strheight functions. Also note the adj parameter (see ?par for details). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Francois Rousseu > Sent: Saturday, March 26, 2011 6:40 PM > To: r-help at r-project.org > Subject: [R] Coordinates of the text region > > > Hello R people > > Is there a way to get the coordinates of the text region (coordinates > of the four corners for example) when using the text function? I'm > looking for a way that does not make use of interactive function like > locator. My goal is to determine the position of other structures in a > graphic so that they don't overlap with the text. > > Thanks > Francois Rousseu > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code.