# http://docs.ggplot2.org/current/theme.html
# http://docs.ggplot2.org/current/scale_date.html
library("ggplot2")
library("scales")
a <- AirPassengers
ap.df <- data.frame(
  year=seq(from=as.Date("1949-01-01"),to=as.Date("1960-12-01"),by="1 month"),
  passengers=as.numeric(a)
)
p <- qplot(data=ap.df,x=year,y=passengers)+geom_line()+scale_x_date(labels = date_format("%Y.%m"))
print(p)

plot of chunk unnamed-chunk-1

p2 <- p+theme(axis.text.x=element_text(angle=-90,vjust = 0))
print(p2)

plot of chunk unnamed-chunk-1