Could anyone please help with adding a smoother to "BB" series only. I tried stat_smooth()
, but it automatically adds smooth line to both series. Below is the code for demonstration purposes:
data1 = melt(data, id = 'Year')
ggplot(data1, aes(x = Year, y = value,colour=variable)) +
geom_line() +
ylab(label="Index") +
xlab("Year") +
scale_colour_manual(values = c("red", "blue"),labels = c("BR", "BB"))+ theme(legend.position=c(0.8,0.9),legend.title=element_blank(),legend.background = element_rect(fill=NULL))+
ggtitle("TITLE")