[R] ggplot-How to define fill colours?
Pedro de Barros
pbarros at ualg.pt
Mon Dec 17 23:54:47 CET 2007
Dear R's (most likely Hadley),
I want to build a stacked bar plot where I would like to define which
colours will be used for each of the groups. However, I do not seem
to find a way to do this, even if I've been looking over many places.
I have tried several variations, and my final try was this code, but
I still do not manage to get the colours as I pre-define. Any hints
about how to get this?
Thanks in advance,
+group=as.character(rep(c('white', 'red', 'blue', 'green'),rep(4,4))))
+fill='group'),geom='bar', stat='identity', position='stack')
More information about the R-help