I made a stacked area charts using ggplot2 like this
ggplot(data, aes(x=time, y=value, fill=group)) +
geom_area()+
scale_fill_manual(values = c("black", "red", "yellow", "purple", "deeppink", "blue"))
In the group variable appear 6 different strings values identifying the groups, how can I assign one precise color to each group?
Furthermore is it possible to order the groups in the chart with the same order as they appear in the data I am passing to the function? Otherwise how can I decide the order?