[R] Colour filling in panel.bwplot from lattice
David Winsemius
dwinsemius at comcast.net
Tue Nov 2 21:43:56 CET 2010
On Nov 2, 2010, at 4:07 PM, Rainer Hurling wrote:
snipped quite a bit of talking past each otther
>
> Of course your example with eight colours works, too. But as you can
> see in the plot, the colours have different order then in the vector
> 'colors()[(2:9)*10]' itself. I expected the first box (bass2)
> coloured "bisque1", the second box (bass1) "blue4" and so on.
Oh. Try putting the fill argument outside the panel and see if the
panel handles it in the manner you expect:
bp3 <- bwplot(voice.part ~ height, data = singer, main = "fill arg
outside bwplot\n1] 'bisque1' 'blue4' 'burlywood3' 'chartreuse3'
'coral3' 'cyan2' 'darkgray' 'darkorange", fill=colors()[(2:11)*10],
panel = function(...) {
panel.grid(v = -1, h = 0)
panel.bwplot( ...)
})
bp3
>
> I hope, this explaination is a bit clearer than my preceding ones.
And I hope my suggestion now "works".
>
>>>>> Thanks in advance,
>>>>> Rainer Hurling
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list