Skip to content
Prev 325295 / 398503 Next

Lattice different colours for bars

On Jun 12, 2013, at 6:43 PM, Andrew McFadden (Andy) wrote:

            
barchart(value~Ikeda|Time, data = mdat,
       type="count",
             col=c("green","red")[1+(mdat$Ikeda=="Ikeda")],
       cex=1.1,
       xlab="PCR positive over time",
       aspect = c(1.5),layout = c(6, 1),
       stack=FALSE,
       strip=strip.custom(strip.names=FALSE, strip.levels=TRUE, bg="light blue"),
       par.strip.text=list(cex=1.1), scales=list(cex=c(1.1)))
Any suggestions on how to do this would be appreciated.