Re: [R] one legend for multiple plots

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Mon 13 Feb 2006 - 04:52:20 EST

Lucy Crooks wrote:

> Does anyone know how to make one legend above the plots drawn using
> par(mfrow=c(1,2)), ie in the margin?
> All I've managed is to put a legend inside the plot region of one
> graph. Although I could write text in the margin I don't know how to
> draw lines in the margin if I were to construct the legend from scratch.

You can simply use legend, but specify par(xpd=TRUE) before...

Uwe Ligges

> Thanks for any help.
>
>
> Lucy Crooks
> Theoretical Biology
> Universitätstrasse 16
> ETH Zentrum, CHN 75.1
> CH-8092 Zurich
>
> Tel.: 0041 44 632 8326
> Fax: 0041 44 632 1271
>
> http://www.eco.ethz.ch/
>
>
> [[alternative HTML version deleted]]
>
>
>
> ------------------------------------------------------------------------
>
> ______________________________________________
> R-help@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



R-help@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 Received on Mon Feb 13 04:54:15 2006

This archive was generated by hypermail 2.1.8 : Tue 14 Feb 2006 - 00:43:17 EST