take a look at 'textbox' in plotrix. On Sat, Mar 26, 2011 at 9:05 PM, Francois Rousseu <francoisrous...@hotmail.com> wrote: > > Let's say I do the following: > > plot(0,0,type="n",xlim=c(0,10),ylim=c(0,10)) > rect(4,5,5,6,border="black",col="white") > text(4.5,5.5,"species",cex=2) > > I would like to be able to determine a rectangle size that will be able to > contain the text species. I'm working on a function using multiple lines and > boxes where text of varying length has to be written. > > Francois > > > >> >> 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 >> > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@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. >
-- Jim Holtman Data Munger Guru What is the problem that you are trying to solve? ______________________________________________ R-help@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.