[R] Move legend text to the left legend box border

Stefan Grosse singularitaet at gmx.net
Wed Aug 19 10:35:37 CEST 2009


On Wed, 19 Aug 2009 10:20:03 +0200 Sigbert Klinke
<sigbert at wiwi.hu-berlin.de> wrote:

SK> in legend I'am coloring my text rather than using symbols or lines:
SK> 
SK> legend("bottomleft", txt, text.col=col, cex=0.7)
SK> 
SK> However, between the left legend box border and the text in txt is a
SK> large empty space. Can I somehow move the text more to the left and
SK> get also a smaller legend box?

try
legend("bottomleft", txt, text.col=col, cex=0.7,inset=-0.05)
and play around with the inset value.

hth
Stefan




More information about the R-help mailing list