[R] putting legend outside ploting region

Uwe Ligges ligges at statistik.uni-dortmund.de
Tue Oct 26 11:43:02 CEST 2004


Ales Ziberna wrote:

> Hello!
> 
> I have created a plot and would like to put a legend in the top left corner
> (above and left of plotting region), but non of the functions can plot there
> (I tried 'legend', 'text', 'points', 'lines', 'mtext', 'axes',...).
> 
> I would be very grateful if someone could help me put something in that
> corrner, with any fuction.
> 
> Thanks,
> Ales Ziberna
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

See ?par, in particular its argument "xpd":

Form ?par:

xpd
A logical value or NA. If FALSE, all plotting is clipped to the plot 
region, if TRUE, all plotting is clipped to the figure region, and if 
NA, all plotting is clipped to the device region.

Uwe Ligges




More information about the R-help mailing list