Dear R Gurus Just started on R ! Using xYplot from Hmisc (R 1.9, W2K) I get a grey/blue background that I would like to change to white (ie no background) or may be to another color. Tried to do that with par(bg) but only changed the color of the trellis heading. What's the right command to do that ? Kind regards, JL PS if anyone has nice default settings for win device please let me know. I used win.slide in Splus but apparently this does not work in R.
Background color Windows device (newbie)
2 messages · Jean-Louis Abitbol, Chuck Cleland
See the bg argument to trellis.device(). Here is an example:
library(Hmisc)
library(lattice)
trellis.device(width=7, height=5, new = TRUE, col = FALSE, bg = "white")
dfr <- expand.grid(month=1:12, continent=c('Europe','USA'),
sex=c('female','male'))
set.seed(1)
dfr <- upData(dfr, y=month/10 + 1*(sex=='female') +
2*(continent=='Europe') +
runif(48,-.15,.15),
lower=y - runif(48,.05,.15),
upper=y + runif(48,.05,.15))
xYplot(Cbind(y,lower,upper) ~ month,subset=sex=='male' &
continent=='USA', data=dfr)
hope this helps,
Chuck Cleland
Jean-Louis Abitbol wrote:
Dear R Gurus Just started on R ! Using xYplot from Hmisc (R 1.9, W2K) I get a grey/blue background that I would like to change to white (ie no background) or may be to another color. Tried to do that with par(bg) but only changed the color of the trellis heading. What's the right command to do that ? Kind regards, JL PS if anyone has nice default settings for win device please let me know. I used win.slide in Splus but apparently this does not work in R.
______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Chuck Cleland, Ph.D. NDRI, Inc. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 452-1424 (M, W, F) fax: (917) 438-0894