Home > Software engineering >  Adding a geom_line to histogram for single factor in R
Adding a geom_line to histogram for single factor in R

Time:05-03

Im trying to add a line to the histogram on the level where group == 1

ggplot(dat, aes(x=age, fill=group))  
    geom_histogram(binwidth=10, position="dodge")

I tried a lot of different things but I cant seem to make it work.

Maybe it's not geom_line but something else ?

ideally i should have something like enter image description here

  • Related