Dear R-Users: I am trying to create a graph with 6 panels, but would like to have a universal legend as each panel merely denotes a separate stratum. The legend has to be at the bottom. I use "par(mfrow=c(2,3))" to get the panels, but am not sure how to put the legend below the whole graph. Thanking you as always. Vumani Dlamini Swaziland
Vumani Dlamini wrote:> > Dear R-Users: > > I am trying to create a graph with 6 panels, but would like to have a > universal legend as each panel merely denotes a separate stratum. The > legend has to be at the bottom. > > I use "par(mfrow=c(2,3))" to get the panels, but am not sure how to put > the legend below the whole graph. > > Thanking you as always.Try layout() for finer adjustments (and some drawbacks). See ?layout how to set up a 7th figure (legend) of full with below the desired six other figures. Uwe Ligges
A 08:24 15/01/2003 +0100, Uwe Ligges a ?crit:>Vumani Dlamini wrote: >>Dear R-Users: >>I am trying to create a graph with 6 panels, but would like to have a >>universal legend as each panel merely denotes a separate stratum. The >>legend has to be at the bottom. >>I use "par(mfrow=c(2,3))" to get the panels, but am not sure how to put >>the legend below the whole graph. >>Thanking you as always. > > >Try layout() for finer adjustments (and some drawbacks). >See ?layout how to set up a 7th figure (legend) of full with below the >desired six other figures. > >Uwe LiggesIt sounds that what Vumani wants is a job for the lattice package. For instance, in ?xyplot (and also other functions of this package), look at the argument "key". Hoping this helps. Emmanuel Paradis