I have an air pollutant that comes from 4 different sources so I have made 4 plot to show the amount of air pollutant across the years to see whether it increased or decreased specifically for Baltimore city and I found that the POINT type is the only one that increased so I want to make the regression line of it red so in general how to edit a plot in such a case ?
Here is the plot
here is a sample of the data frame :
type year emissions
1 NON-ROAD 1999 522.94000
2 NON-ROAD 2002 240.84692
3 NON-ROAD 2005 248.93369
4 NON-ROAD 2008 55.82356
5 NONPOINT 1999 2107.62500
6 NONPOINT 2002 1509.50000
7 NONPOINT 2005 1509.50000
8 NONPOINT 2008 1373.20731
9 ON-ROAD 1999 346.82000
10 ON-ROAD 2002 134.30882
11 ON-ROAD 2005 130.43038
12 ON-ROAD 2008 88.27546
13 POINT 1999 296.79500
14 POINT 2002 569.26000
15 POINT 2005 1202.49000
16 POINT 2008 344.97518
ggplot(Baltimore , aes(years,emissions)) +
geom_point() +
facet_wrap(.~ Baltimore$type) +
geom_smooth(method = "lm" , se=FALSE ,col = "green" ) +
ggtitle("emission across years splited by source type" )