3

Possible Duplicate:
ggplot custom colors palette

Hello,

I am using this question - Making a stacked area plot using ggplot2 - to make a nice stacked area plot.

The resulting grapg is nice, but I cannot find how to change the colors in ggplot graph.

Community
  • 1
  • 1
Karel Bílek
  • 36,467
  • 31
  • 94
  • 149

1 Answers1

1

you need to manual designate 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)
wespiserA
  • 3,131
  • 5
  • 28
  • 36
  • 1
    Thanks. That's what I got from he duplicate question :) Also, I need to use `scale_color_manual` so the borders are colored the same way. I will accept you before this question is closed. :) – Karel Bílek May 17 '11 at 20:26
  • Thank Karel, my first picked answer! – wespiserA May 17 '11 at 21:36