[R] Box around legends (and postscript?)

Michael J. Manning mj.manning at niwa.cri.nz
Tue Dec 11 01:37:08 CET 2001


Hello Uwe

On 10 Dec 2001, at 22:49, Uwe Ligges wrote:
> 
> Use the argument text.width, e.g.
> 

where text.width is set to the largest (i.e. longest) text string in a 
vector of strings to be drawn on the legend, in combination with 
tweaking cex works fine, e.g.

plot(...)

legend(30,0.375,legend=c("Male (n=162)","Female (n=976)"), 
col=c("blue","red"),lty=1,cex=0.8,text.width=strwidth("Female 
(n=976)"))

Thanks muchly

MJM

Michael J. Manning
Stock Monitoring and Data Services
National Institute of Water and Atmospheric Research Ltd (NIWA)
PO Box 14901, Kilbirnie
Wellington, New Zealand
Tel. 64 4 386 0300
Fax. 64 4 386 0574
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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 at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list