[R] controlling colour in Trellis histogram
Deepayan Sarkar
deepayan at stat.wisc.edu
Fri Oct 1 16:58:56 CEST 2004
On Friday 01 October 2004 09:25, Chuck Cleland wrote:
> Does this help?
>
> mydata <- data.frame(OPTIMISM =
> c(29,35,26,22,30,37,29,32,25,35,38,33,41,28,40),
> PARENTS = rep(c("Both Deceased", "One
> Deceased", "Both Alive"), c(4,5,6)))
>
> library(lattice)
>
> trellis.device(width=7, height=5, new = FALSE, col = FALSE, bg =
> "white")
The bg="white" is redundant if color=FALSE.
Incidentally, if color=TRUE, setting bg="white" is IMO bad practice
(although it seemed like a good idea at the time), since it creates
settings with a white background while the other colors are only
suitable for a dark background. To make it more difficult for users to
achieve this, the 'bg' argument has been dropped from trellis.device in
2.0.0.
Deepayan
More information about the R-help
mailing list