From: "Terry J. Westley" <twestley@buffalo.veridian.com>
To: "R-Help" <r-help@stat.math.ethz.ch>
Subject: [R] measure displayed size of a character string
Date: Mon, 21 Jun 1999 19:37:49 -0400
Is there a way to measure the length of a character string as
text() or mtext() would display it? Not in characters, but in
inches or user coordinates.
I'm displaying a hierarchical list in the left margin. I'd like
to determine the length of the labels so that I can resize the
plot so the labels don't spill over into the plot area.
Like this:
+------------------
Earth |
| |
+-Africa |
| | |
| +-Nigeria |
| |
+-Europe |
| |
+-France |
+------------------
-- Terry J. Westley, Principal Engineer Veridian Engineering, Calspan Operations twestley@buffalo.veridian.com http://www.veridian.com/ ------------------------------------------------------- Author of TASH, an Ada binding to Tcl/Tk. Visit the TASH web site at http://tash.calspan.com. --------------------------------------------------------.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._