When I plot time series objects in ggplot2 where the horizontal axis are date objects (month-end dates), I find that the dates somehow get "rounded-up" to the beginning of the next month. For example, "January 31, 2014" would appear as "February 1, 2014". An example is provided below. How can I fix this? Thanks!
fruits.sold <- data.frame(Date=c("1/31/2014", "1/31/2014", "2/28/2014", "2/28/2014", "3/31/2014", "3/31/2014"),
Fruit=c("Apple", "Banana", "Apple", "Banana", "Apple", "Banana"),
Sold=c(200, 300, 250, 350, 300, 400))
fruits.sold$Date <- as.Date(fruits.sold$Date, "%m/%d/%Y")
qplot(Date, Sold, colour=Fruit, data=fruits.sold)
