On Thu, Oct 30, 2008 at 4:10 PM, Barker, Chris <Chris.Barker at cvt.com>
wrote:>
>
> I am using the lattice histogram
>
> histogram( ~ base_var | treatment, data=mydataset )
>
> In my dataset, the histogram produces (as expected) two histograms,
> each corresponding to one of the two treatments.
>
> I would like to have the histogram for one treatment to have, say, red
> bars, the histogram for the second treatment, to have blue bars.
>
> I tried the ",col=" option, but that colors individual bars
rather than
> the histogram.
Try
histogram(~ base_var | treatment, data=mydataset
panel = function(..., col) panel.histogram(..., col = c('red',
'blue')[packet.number()]))
-Deepayan