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

标签 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_histogramgeom_density 一样,在我想删除的直方图底部添加了一个“基线”栏。这条线怎么去掉?这是我指的用箭头注释的行的图片。谢谢。 enter image description here

最佳答案

那是从酒吧的边缘传来的。

只需删除 colour = "sample"

关于python - 通过rpy2从ggplot2中的geom_histogram中删除基线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14938865/

相关文章:

python - 更改浅复制中的列表元素

r - 清除 R 工作区

r - 如何从雅虎(使用 Quantmod)获取 ETF 财务信息(例如 NAV)?

r - ggplot2多线样条平滑

r - 在圆形直方图中仅显示给定的角度范围

python - Django 扩展 model.User

javascript - 从 JavaScript 到 Django 的实时音频流

python - Pandas Groupby : How to use two lambda functions?

将 'raw' xlsx 文件从 httr 响应读取到数据帧中

r - ggplot2:绘制每个 id 的所有属性