参考站点1
http://stackoverflow.com/questions/5171263/r-changing-line-colors-with-ggplot
颜色向量的个数 根据你的group分组个数来定义 ,下面
参考站点2 http://www.cookbook-r.com/Graphs/Colors_(ggplot2)/
# The palette with grey:
cbPalette <- c("#999999", "#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7")
# The palette with black:
cbbPalette <- c("#000000", "#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7")
# To use for fills, add
scale_fill_manual(values=cbPalette)
# To use for line and point colors, add
scale_colour_manual(values=cbPalette)
颜色向量的个数 根据你的group分组个数来定义 ,下面