R - color change in ggplot2 chart

Possible duplicate:
ggplot custom color palette

Hello,

I use this question - Creating a site by area using ggplot2 - to make a good site with a stacked area.

The result of grapg is good, but I can not find how to change the colors in the graph ggplot.

+3
source share
1 answer

you need to manually specify the colors you want to use, then use scale_fill_manual.

rhg_cols1<- c("#000000","#F8766D","#7CAE00","#00BFC4","#C77CFF" )

ggplot()+geom_bar()+opts()+ scale_fill_manual(values = rhg_cols1)
+1
source

All Articles