It would help a lot if you provided a minimal dataset that we could play with (not just the metadata of that set), ideally using dput, see https://gist.github.com/270442
Having said that I think you will figure it out from
http://had.co.nz/ggplot2/geom_bar.html
the trick, if I understand you right, is realizing that with geom_bar you don't need a 'y' variable in the aes (ie ggplot2 generates the count).
ggplot(data, aes(Date)) + geom_bar() + scale_x_date(format = "%b")
With that in place probably the more interesting question is: how do I organize the count by month/week, ie set the binwidth appropriately. That I'm not as sure about. I had thought that it would be expressed in seconds, but messing around with
data <- data.frame( date = seq(Sys.Date(), len=100, by="1 day")[sample(100, 50)], price = runif(50) )
ggplot(data, aes(date)) + geom_bar(binwidth=30) + scale_x_date(format = "%b")
suggests that binwidth is in days there ... perhaps that's because this is scale_x_date, not scale_x_datetime? How does scale_x_date (e.g. major=months and binwidth in geom_bar interact? To get counts by month (an irregular time period) would one be best to normalize the date of each event to the middle of the month?
--J
> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> Please provide a reproducible example: http://gist.github.com/270442
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2