R语言绘图常用的颜色组合
1、
> library(RColorBrewer)
> a <- brewer.pal(9,"Set1")
> a
[1] "#E41A1C" "#377EB8" "#4DAF4A" "#984EA3" "#FF7F00" "#FFFF33"
[7] "#A65628" "#F781BF" "#999999"
> barplot(rep(1,9),col = a)
2、
> a <- rainbow(10)
> a
[1] "#FF0000" "#FF9900" "#CCFF00" "#33FF00" "#00FF66" "#00FFFF"
[7] "#0066FF" "#3300FF" "#CC00FF" "#FF0099"
> barplot(rep(1,10),col = a)
3、
> a <- heat.colors(10)
> a
[1] "#FF0000" "#FF2400" "#FF4900" "#FF6D00" "#FF9200" "#FFB600"
[7] "#FFDB00" "#FFFF00" "#FFFF40" "#FFFFBF"
> barplot(rep(1,10),col = a)
4、
> a <- terrain.colors(10)
> a
[1] "#00A600" "#2DB600" "#63C600" "#A0D600" "#E6E600" "#E8C32E"
[7] "#EBB25E" "#EDB48E" "#F0C9C0" "#F2F2F2"
> barplot(rep(1,10),col = a)
5、
> a <- topo.colors(10)
> a
[1] "#4C00FF" "#0019FF" "#0080FF" "#00E5FF" "#00FF4D" "#4DFF00"
[7] "#E6FF00" "#FFFF00" "#FFDE59" "#FFE0B3"
> barplot(rep(1,10),col = a)