[R] Legend position outside

Edwin Sendjaja edwin7 at web.de
Sat Apr 12 05:56:07 CEST 2008


Hello Gred,

I try to read R-Reference, but I cant understand it.

What does par (xpd=NA)? and par('usr')) mean? Thank you.






Kind regards,

Edwin 



Am Freitag, 11. April 2008 19:19:24 schrieben Sie:
> Yes, here is one way:
> > plot(1:10, pch=1:2)
> > par(xpd=NA)
> > tmp.u <- par('usr')
> > legend(tmp.u[1], tmp.u[4], xjust=0, yjust=0, c('a','b'), pch=1:2)
>
> You will probably want to increase the margins for a real case.  See
> ?par and the 'xpd' entry for details on the clipping and ?legend for
> more details on creating the legend.
>
> Hope this helps,



More information about the R-help mailing list