[R] how to plot a nice legend

Bretschneider SIG-R bretschr at xs4all.nl
Sun Feb 12 14:19:40 CET 2012


Dear Jonas Stein,


You may add a line defining a large margin to harbour the legend,
such as:

	par(mai=c(0.5, 0.5, 0.5, 1.8))   #  enlarged right margin
	plot(1:10)
	legend("right", legend=c("one", "two"), inset=-0.2, xpd=NA)


Kind regards,



Franklin Bretschneider
--
Dept Biologie
Kruytgebouw W711
Padualaan 8
3584 CH Utrecht
The Netherlands



More information about the R-help mailing list