Jun Shen
2012-Apr-16 15:43 UTC
[R] How to adjust the distance between legend and the plot (xyplot)
Dear list, As the title indicates if I draw the legend outside of the plot, how do I adjust the distance between the legend and the plot? The default setting is too close. Thanks. Here is the sample code I have =========================================================xyplot(1~1,key=list(space='bottom',columns=2,text=list(c('a','b','c','d')), lines=list(lwd=2,pch=c(1,1,2,2),cex=1.2,col=c(1,2,3,4),type=c('p','l'))) ) Jun [[alternative HTML version deleted]]
David Winsemius
2012-Apr-16 15:51 UTC
[R] How to adjust the distance between legend and the plot (xyplot)
On Apr 16, 2012, at 11:43 AM, Jun Shen wrote:> Dear list, > > As the title indicates if I draw the legend outside of the plot, how > do I > adjust the distance between the legend and the plot? The default > setting is > too close. Thanks.From the help page: "just A character or numeric vector of length one or two giving horizontal and vertical justification for the placement of the legend. See grid.layout for more precise details."> > Here is the sample code I have > > =========================================================> xyplot > (1~1,key=list(space='bottom',columns=2,text=list(c('a','b','c','d')), > lines > =list(lwd=2,pch=c(1,1,2,2),cex=1.2,col=c(1,2,3,4),type=c('p','l'))) > ) > > Jun > > [[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.David Winsemius, MD West Hartford, CT