[R] histogram colors in lattice

2006-09-26 Thread Jamie Jarabek
I have code that constructs a plot using the lattice package that looks something like the following toy example: library(lattice) Start - factor(rbinom(100,1,.5)) Answer - 2 - rbinom(100,1,.7) histogram(~Answer | Start, breaks=c(1, 1.4 ,1.6,2),

Re: [R] histogram colors in lattice

2006-09-26 Thread Gabor Grothendieck
Try this: library(lattice) set.seed(1) ## added for reproducibility Start - factor(rbinom(100,1,.5)) Answer - 2 - rbinom(100,1,.7) histogram(~Answer | Start, breaks=c(1, 1.4 ,1.6,2), scales=list(x=list(at=c(1.2,1.8),labels=c(Yes,No))), panel = function(x, ...,