Re: [R] legend for several graphics

From: hadley wickham <>
Date: Wed, 05 Mar 2008 14:21:22 -0600

On Wed, Mar 5, 2008 at 8:28 AM, Georg Otto <> wrote:
> Hi,
> I am trying to generate a figure of 9 plots that are contained in one
> device by using
> par(mfrow = c(3,3,))
> I would like to have 1 common legend for all 9 plots somewhere outside
> of the plotting area (as opposed to one legend inside each of the 9
> plots, which the function legend() seems to generate by default).

If you provide more detail about your problem (what are the 9 plots?) I'm sure we can suggest other solutions using lattice or ggplot that will substantially simplify your code, as well as automatically drawing the legend.



______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 05 Mar 2008 - 20:24:52 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 05 Mar 2008 - 21:30:20 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive