[R] Stacked barchart color

Dieter Menne dieter.menne at menne-biomed.de
Tue Jun 12 21:06:30 CEST 2007


hadley wickham <h.wickham <at> gmail.com> writes:

> 
> On 6/12/07, Dieter Menne <dieter.menne <at> menne-biomed.de> wrote:
> > Dear Latticer,
> >
> > I want to give individual colors to all elements in a simple stacked
> > barchart. I know why the example below does not work (and it is a excellent
> > default), but is there any workaround for this?
> >
> 
> You can do this with ggplot2 (http://had.co.nz/ggplot2) as follows:
> 
> library(ggplot2)
... 

Thanks, Hadley and Deepayan. Hadley's version required the latest update of
ggplot2 (0.5.1).

Dieter



More information about the R-help mailing list