I am plotting a graph with different categories (years) that are represented by different colours. R automatically draw the plot in different blue tones. How can I change the colour of every single year? Do you have any tips? My code is:
year_1999<-subset(count_all, year.x<=2004)
first.plot<-ggplot(year_1999, aes(temperature, ENS, col=year.x))+
geom_point(shape=17)+
geom_smooth((aes(group=year.x), method = "loess", alpha = 0.1)+
ylab("ENS")+
xlab("Temperature [°C]")+
ggtitle("1999-2004")+
labs(color = "Year")+
theme(plot.title = element_text(hjust = 0.5))+
theme(axis.title.y=element_text(size=18,colour="black",vjust=0.7),axis.text.y=element_text(size=12,face="bol d",colour="black",angle=0,hjust=0.9))+
theme(axis.title.x=element_text(size=18,colour="black",vjust=0.2),axis.text.x=element_text(size=12,colour="b lack",face="bold"))+
theme(panel.grid.major=element_blank(),panel.grid.minor=element_blank())+
theme(plot.margin=unit(c(0.2,0.2,.2,0.2),"cm"))+
theme(panel.border=element_rect(colour="black",size=1.5))+
theme(axis.ticks=element_line(colour="black",size=1),axis.ticks.length=unit(0.3,"cm"))
first.plot`