If I have a dataframe similar to that below
a=data.frame(year=paste('FY',2001:2012,sep='.'),values=rnorm(12))
library(ggplot2)
The following graph works
ggplot(a,aes(x=year,y=values,group=1))+geom_line()
but the following one does not.
ggplot(a,aes(x=year,y=values,group=1))+geom_line() +xlim(0,13)
How can I extend the limits of a ggplot of data that has a category axis rather than a numeric one?