Use a smaller cex within legend (e.g. cex=0.75) to adjust the size of the printed text. This controls the size of the legend. Also, you can play with xjust and yjust for finer control of how the legend box is justified at the specified position.
-Christos -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Baoqiang Cao Sent: Tuesday, April 18, 2006 9:38 AM To: [email protected] Subject: [R] how to change legend size in a figure Dear All, I am producing a figure with many curves on it. How do I make the legends for all those curves smaller so that it can fit the figure itself? The commands I used for ploting are: plot(x1,y1,col=1,lty=1) lines(x2,y2,col=2,lty=2) ... legend(0.3,0.4,c("name1","name2",...),col=1:20,lty=1:20) Any tips for making the legend fit the figure will very welcome! Thanks! Best, Baoqiang Cao ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
