是否有可能在R中用条形图"分割条形图"?

Cha*_*aff 3 r

我在= T旁边有一个条形图.我需要的是在每个条形的每个高度"标记"处分割(或绘制一条水平线).

样本矩阵图:

    > head(top.fem)
        FD1 FE2 FF1
    J01   2   2  10
    J02   4   0   0
    J03   6   2   5
    J04   1   6   3
    J05  10  10   2
    J06   9   6   5
Run Code Online (Sandbox Code Playgroud)

我只是:

barplot(top.fem,beside = T)
Run Code Online (Sandbox Code Playgroud)

因此,对于FD1,杆1的高度为2,杆2的高度为1,杆3的高度为6等...如何将杆1分成两个,两个四分之一和三个中的三个?结果将"看起来像"一个堆积条形图,但事实并非如此.我清楚了吗?

Thanx任何帮助!

Vin*_*ynd 7

您可以在整个图片上添加水平线:如果它们是白色,如果背景是白色,它们将保持不被注意.

barplot(VADeaths, beside=TRUE, las=1)
abline(h=0:100, col="white")
barplot(
  VADeaths, beside=TRUE, las=1,
  add=TRUE, col=FALSE
)
Run Code Online (Sandbox Code Playgroud)

barplot