我无法将条形图中的颜色归因于行,它们不存在。当我使用命令时:
barplot(data[,3:429])
它确实给了我正确的高度模式,但它全是黑色的。我有 22 行不同的行(每行有 427 个变量),但这些行在我的图中没有识别。
一小部分数据如下所示:
VT ATC V4 V5 V6 V7 V8 V9 V10 V11 V12 .... V429
1 1 0 1 1 2 2 2 2 1 1
1 2 0 1 1 1 1 1 1 1 1
1 3 0 0 0 0 0 0 0 0 0
1 4 0 0 0 0 0 0 0 0 0
1 5 0 0 0 1 1 1 1 0 0
我试过添加颜色,但它不是这样工作的:
barplot(data[,3:429],col=c("blue", "aliceblue","antiquewhite", "antiquewhite1","antiquewhite2","antiquewhite3", "antiquewhite4","aquamarine","aquamarine1","aquamarine2", "aquamarine3", "aquamarine4", "darkgreen", "darkgrey","darkkhaki","darkmagenta", "darkolivegreen","darkolivegreen1","darkolivegreen2","darkolivegreen3","darkolivegreen4","darkorange"))
这 22 种颜色是随机选择的,它们没有特定的含义。
我究竟做错了什么?