On 4/13/07, Arne Schröder <[EMAIL PROTECTED]> wrote: > I want to produce stacked histograms where the total bar is divided up > according to the n levels of the grouping variable given in the group > argument. > I am using the lattice histogram function and its "group"-argument, but > it is not recognised. The "auto.key" argument, however, is, because it > gives > me the correct group levels and when setting groups = NULL, auto.key = > TRUE is obviously not producing any legend). Is this because the default > "panel"-argument of histogram() = panel.histogram has no group-argument > (in contrast to the xyplot() function and xyplot.histogram)? Is tehre a > way around it?
Write your own panel function, it shouldn't be too hard. Don't expect it to be part of lattice, because I think stacked histograms are a bad idea (use stacked bar charts for factors or grouped density plots for continuous data) and it will not be in lattice for the same reason there are no pie charts. Histograms are bad enough to begin with. -Deepayan ______________________________________________ [EMAIL PROTECTED] 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.