I plot a time series graph of search volume on the word "shopping" which is deseasonalized over the period of January 2004 to December 2014. However the dates on my x axis shows all the months I have for my data and it overlaps which looks messy. How can I convert this into only the years that are shown?
This is my code:
ggplot(data=mergeddata, aes(x=Date, y=ShoppingDeseason, group=1)) +
geom_line(colour="red", size=1) + xlab("Date [Year]") +
ylab("ShoppingDeseason [SearchVolume]") +
ggtitle("Search Volume on Shopping from 2004 to 2014") +
theme(axis.text.x=element_text(size=20,angle=90, face="bold"),
axis.text.y=element_text(size=20, face="bold"),
axis.title=element_text(size=22,face="bold"))
Try to use
scale_x_date()
: