hi everyone. can anybody help me? i want add a legend on my graph. but i didn't success and get to error. i'm going to add legend on top-right of graph.
my coding is :
ggplot() +
geom_line(data = zinc, mapping = aes(x = wavelength, y = absorbance ), color = "#525452", size=1.2, alpha =0.7) +
geom_line(data = zinc, mapping = aes(x = wavelength, y = absorbance.1 ) , color = "#fc4503", size=1.2, alpha = 0.8) +
theme_classic() +scale_x_continuous(breaks = c(200, 400,600,800,1000),"wavelength(nm)") +
theme(axis.text.x=element_text(vjust = -1)) +
theme(axis.text.y.left=element_text(hjust=5)) +ylim(0,5)+ theme(text = element_text(size = 15))