error on adding legend in line graph

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))

Hi, welcome!

To help us help you, could you please turn this into a proper reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.