Is it possible to plot a single density over a discrete variable?

Posted by mattrepl on Stack Overflow See other posts from Stack Overflow or by mattrepl
Published on 2010-05-02T19:21:48Z Indexed on 2010/05/02 19:28 UTC
Read the original article Hit count: 263

Filed under:
|
|

The x-axis is time broken up into time intervals. There is an interval column in the data frame that specifies the time for each row.

Plotting a histogram or line using geom_histogram and geom_freqpoly works great, but I'd like to use geom_density to get a filled area. Perhaps there is a better way to achieve this.

Right now, if I use geom_density, curves are created for each discrete factor level instead of smoothing over all of them.

© Stack Overflow or respective owner

Related posts about rstats

Related posts about r