通过rpy2从ggplot2中的geom_histogram中删除基线?

时间:2013-02-18 14:42:59

标签: python r ggplot2 rpy2

我正在通过rpy2用ggplot2绘制直方图,如下所示:

p = ggplot2.ggplot(df) + \
    ggplot2.aes_string(x="x", colour="sample") + \
    ggplot2.facet_grid(Formula("sample ~ .")) + \
    ggplot2.geom_histogram(binwidth=0.3, fill="white")

效果很好,除了geom_histogram,像geom_density一样,在我要删除的直方图底部添加了一个“基线”栏。如何删除此行?这是我用箭头注释的线条图片。谢谢。 enter image description here

1 个答案:

答案 0 :(得分:1)

那是来自酒吧的边缘。

只需删除colour = "sample"