[BioC] how to add a common legend to a 2 plots in a row?

Wolfgang Huber huber at ebi.ac.uk
Fri Apr 18 14:44:31 CEST 2008


17/04/2008 20:33 carol white a écrit
> Hi,
> How to add a common legend (a list of text, in 1 column) to 2 plots displayed by par (mfrow = c(1,2)) in a row? i don't know how to add the legend between 2 plots or for ex, in the right upper corner of the right plots in the margin of the right plots when there is no place to display the legend in the plot region (overlapping problem). Any other suggestion to place the legend is welcome.
> 
> Regards,
> 
> carol 

Dear Carol,

have a look at the "lattice" package, one of whose strengths is exactly
what you've been asking for. Using it, however, is quite different from
using the ordinary R plotting functions, so you will probably need to
invest some time & effort learning the new way. But it's an investment
that pays off very nicely!

Best wishes
 Wolfgang

------------------------------------------------------------------
Wolfgang Huber  EBI/EMBL  Cambridge UK  http://www.ebi.ac.uk/huber



More information about the Bioconductor mailing list