[R] merging plot labels in a lattice plot
Rajarshi Guha
rajarshi.guha at gmail.com
Fri Jul 2 17:57:23 CEST 2010
Hi, I have a lattice lot conditioned on two variables. Example code is:
library(lattice)
x <- data.frame(d=runif(100),
f1=sample(c('yes', 'no'),100,replace=TRUE),
f2=c(rep('Run1',30),rep('Run2',30),rep('Run3',40)))
histogram(~d | f1 + f2, x)
In the plot, for a given value of f2, there are two panels, one for
'n' and one for 'yes'. But above each panel I get the value of f2.
What I'd like to be able to do is to have the value of f2 span the two
panels (ie merge the green rows and use a single label).
Any pointers as to how I could acheive this would be appreciated
Thanks,
--
Rajarshi Guha
NIH Chemical Genomics Center
More information about the R-help
mailing list