I am working on some code where I have to plot MPG of all types of cars over several years. I am using geom="boxplot" in R and it returns the boxplots, but puts all the years as the axis values. I would like it to return all the boxplots, but only list every five years, i.e. 1985, 1990, 1995, etc.
Below is the following code that I am using:
qplot(factor(year), comb08, data=car, geom="boxplot", xlab="Year", ylab="MPG")
car?scale_x_continuous(breaks=seq(Year[1],Year[length(Year)],by=5))to set 5 year breaks