Manage x-axis using ggplot() Source: https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip

Here is my data prep.  

NEI &lt;- readRDS("summarySCC_PM25.rds")
Baltimore &lt;- NEI[NEI$fips=="24510", ]
Baltimore$type &lt;- as.factor(Baltimore$type)
Total_Emmisssions &lt;- aggregate(Baltimore$Emissions, 
                               by=list(Baltimore$year, Baltimore$type),
                               FUN=sum)
names(Total_Emmisssions) &lt;- c("Year","Type","Emissions")  


Plot code  

library(ggplot2)
g &lt;- ggplot(Total_Emmisssions,aes(x=Year, y=Emissions, colour=Type))
g1 &lt;- g+geom_point()
g2 &lt;- g1+facet_grid(. ~ Type)
g3 &lt;- g2+geom_smooth(method="lm", se=FALSE)


However, in this plot, the year is always 2002-2008. How do I change the scale / ticks to show from 1999-2008 at an interval of 3 years. Using scale_x_discrete does not work and it messes the graph. Please help.

str(Total_Emmisssions)
'data.frame':   16 obs. of  3 variables:
 $ Year     : int  1999 2002 2005 2008 1999 2002 2005 2008 1999 2002 ...
 $ Type     : Factor w/ 4 levels "NON-ROAD","NONPOINT",..: 1 1 1 1 2 2 2 2 3 3 ...
 $ Emissions: num  522.9 240.8 248.9 55.8 2107.6 ...
Change Year to a factor and add group=1:

g &lt;- ggplot(Total_Emmisssions,aes(x=factor(Year), y=Emissions, colour=Type, group=1))


you can leave the rest the same (you'll also prbly want to change the xlab).