Re: [R] legend for several graphics

2008-03-07 Thread Georg Otto
Thanks a lot, John, Gavin; Hadley and Greg, for your helpful comments and suggestions. I finally achieved what I wanted using the suggested method from Gavin with corrections from Greg. Out of curiosity (and interest to learn): Hadley, how would you simplify that code using lattice or ggplot and h

Re: [R] legend for several graphics

2008-03-06 Thread Gavin Simpson
or legend > legend(tmp2$x, tmp2$y, legend = c("Type 1", "Type 2"), > pch = 1:2, col = 1:2, ncol = 2, xjust=0.5, yjust=0.5) > par(op) > > > Hope this helps, > > > -- > Gregory (Greg) L. Snow Ph.D. > Statistical Data Center > Intermounta

Re: [R] legend for several graphics

2008-03-06 Thread Greg Snow
s, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Gavin Simpson > Sent: Wednesday, March 05, 2008 11:43 AM > To: Georg

Re: [R] legend for several graphics

2008-03-05 Thread hadley wickham
On Wed, Mar 5, 2008 at 8:28 AM, Georg Otto <[EMAIL PROTECTED]> 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

Re: [R] legend for several graphics

2008-03-05 Thread Gavin Simpson
On Wed, 2008-03-05 at 15:28 +0100, 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 leg

Re: [R] legend for several graphics

2008-03-05 Thread John Kane
?mtitle should do it. --- Georg Otto <[EMAIL PROTECTED]> 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 op

[R] legend for several graphics

2008-03-05 Thread Georg Otto
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 ge