Hi,

Yes, I have searched stack overflow.

My issue is to simply change coloring in boxes and legend in my bwplot. I have 
done this many times in lattice, but now I have been tweaking the plot somewhat 
and I can no longer apply the color changes.
I would really appreciate some help.
A. Zakrisson

Here is some dummy data and my script:

mydata<- data.frame(factor1 = factor(rep(LETTERS[1:6], each = 80)),
                    factor2 = factor(rep(c(1:2), each = 16)),
                    var1 = rnorm(120, mean = rep(c(0, 3, 5), each = 40),
                                 sd = rep(c(1, 2, 3), each = 20)))

font.settings <- list( font = 1, cex = 1, fontfamily = "serif")
my.theme <- list(
  box.umbrella = list(col = "black"),
  box.rectangle = list(fill= rep(c("black", "black"),2)),
  box.dot = list(col = "black", pch = 3, cex=2),
  plot.symbol   = list(cex = 1, col = 1, pch= 0), #outlier size and color
  par.xlab.text = font.settings,
  par.ylab.text = font.settings,
  axis.text = font.settings,
  par.sub=font.settings)

bwplot(var1 ~ factor1, data = mydata, groups = factor2,
       box.width = 1/3,    #width of the boxes
       auto.key = list(points = FALSE,
                       rectangles = TRUE, space = "right",
                       title="Year", cex.title=1),
       panel = panel.superpose,
       ylab = "var1",
       xlab="factor1",
       par.settings = my.theme,
       panel.groups = function(x, y, ..., group.number) {
         panel.bwplot(x + (group.number-1.8)/3, y, ...)
       })


Anna Zakrisson Braeunlich
PhD student

Department of Ecology, Environment and Plant Sciences
Stockholm University
Svante Arrheniusv. 21A
SE-106 91 Stockholm
Sweden/Sverige

Lives in Berlin.
For paper mail:
Katzbachstr. 21
D-10965, Berlin - Kreuzberg
Germany/Deutschland

E-mail: anna.zakris...@su.se
Tel work: +49-(0)3091541281
Mobile: +49-(0)15777374888
LinkedIn: http://se.linkedin.com/pub/anna-zakrisson-braeunlich/33/5a2/51b

><((((º>`•. . • `•. .• `•. . ><((((º>`•. . • `•. .• `•. .><((((º>`•. . • `•. .• 
>`•. .><((((º>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to