3
我在R中有一个数据框。在每个数据框中有8个变量。barplot()基于列中类别数的不同颜色的灰色条纹
我想创建一个barplot,我想根据一个特定变量中的值为条分配不同的灰度阴影。
这是我做了一个barplot:
barplot(x$cov, names.arg = x$exon,
xlab = x$gene[1],
ylab = "read depth" ,
border = gray.colors(???))
可变外显子组成的整数。例如:
0 0 0 0 1 1 1 2 2 3 3 3 3 4 4 4
所以我希望所有的栏,其中$exon = 0
是在灰色 所有栏,其中$exon = 1
在灰色的另一种颜色一个影等...
能有人给我是一只手?