On Mon, Apr 27, 2009 at 12:15 PM, John Poulsen <jpoulsen at zoo.ufl.edu>
wrote:> Hello,
>
> I am trying to graph a violin plot like the example in
panel.violin(lattice)
> with the singer data - see below
>
> Does anyone know how to change the color of the boxplot on the graph from
> blue to green? ?I tried a number of changes, but to no avail.
It's only accessible through the settings (which you can only tell by
looking at the definition of panel.bwplot):
bwplot(voice.part ~ height, singer,
panel = function(..., box.ratio) {
panel.violin(..., col = "transparent",
varwidth = FALSE, box.ratio = box.ratio)
panel.bwplot(..., fill = NULL, box.ratio = .1)
},
par.settings = list(box.rectangle = list(col = "darkgreen"),
box.umbrella = list(col = "darkgreen")))
-Deepayan
>
> Thanks for your help,
> John
>
>
>
> bwplot(voice.part ~ height, singer,
> ? ? ? ? ? panel = function(..., box.ratio) {
> ? ? ? ? ? ? ? ? ? panel.violin(..., col = "transparent",
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? varwidth = FALSE, box.ratio =
box.ratio)
> ? ? ? ? ? ? ? ? ? panel.bwplot(..., fill = NULL, box.ratio = .1)
> ? ? ? ? ? ?} )
>
> ______________________________________________
> R-help at 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.
>