My data set looks like this:
x:
Date variable value
1/1/2012 A 10
1/1/2012 B 10
1/1/2012 C 10
1/1/2012 D 10
1/2/2012 A 10
1/2/2012 B 10
1/2/2012 C 10
1/2/2012 D 10
1/3/2012 A 10
1/3/2012 B 10
1/3/2012 C 10
1/3/2012 D 10
I am doing this:
rhg_cols1<- c("#000000","#F8766D","#7CAE00","#00BFC4","#C77CFF" )
ggplot(x, aes(Date, value, fill = variable, colour=variable)) + geom_point()+ scale_fill_manual(values = rhg_cols1)
I am still seeing the default color. Can anybody tell me what is wrong? Better yet, rather than giving the specific colors as in rhg_cols1, I like to say low=red, high=black.
any input is very appreciated.
You want to use
To set low and high colors you can use the
scale_XXXX_gradient()function.An example using
scale_XXXX_gradientis here.