user248237
user248237

Reputation:

removing base line from geom_histogram in ggplot2 via rpy2?

I am plotting a histogram with ggplot2 via rpy2 as follows:

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

It works great, except that geom_histogram, like geom_density, adds a "base line" bar at the bottom of the histogram that I would like to remove. How can this line be removed? Here's a picture of the line I am referring to annotated with an arrow. thanks. enter image description here

Upvotes: 4

Views: 1274

Answers (1)

lgautier
lgautier

Reputation: 11555

That's coming from the edge of the bar.

Just remove colour = "sample".

Upvotes: 1

Related Questions