On the x axis, time is divided into time intervals. There is an interval column in the data frame that indicates the time for each row. A column is a factor, where each interval represents a different factor level.
Building a histogram or line using geom_histogram and geom_freqpoly works fine, but I would like to have a line like the one provided by geom_freqpoly with a filled area.
I am currently using geom_freqpoly as follows:
ggplot(quake.data, aes(interval, fill=tweet.type)) + geom_freqpoly(aes(group = tweet.type, colour = tweet.type)) + opts(axis.text.x=theme_text(angle=-60, hjust=0, size = 6))

I would prefer to have a filled area, such as provided by geom_density , but without smoothing the line:

geom_area has been suggested, is there a way to use the statistics generated by ggplot2, such as ..count .., for geom_area y values? Or, do you need to aggregate before using ggplot2?
As indicated in the answer, geom_area (..., stat = "bin") is the solution:
ggplot(quake.data, aes(interval)) + geom_area(aes(y = ..count.., fill = tweet.type, group = tweet.type), stat = "bin") + opts(axis.text.x=theme_text(angle=-60, hjust=0, size = 6))
gives:

r ggplot2
mattrepl
source share