I want add legend on the code below and the excel data as shown below
> library(tidyverse)
> library(lubridate)
> library(ggplot2)
> OTCData <- file.choose()
> OTC<- read.csv(OTCData,header=TRUE)
>
> ggplot(data=OTC, aes(x=OTC$DATE, y=OTC$GrossCreditExposure))+
> geom_line()+
> geom_line(aes(X=DATE, y= GrossCreditExposure),
> , color = "blue",
> alpha = 0.6,
> size = 1,
> group =1) +
> geom_line(aes(X=DATE, y = GrossMarketValues),
> color = "red",
> alpha = 0.6,
> size = 1,
> group =1) +
>
> labs(x="Date",y="Amount in US$", color = "Legend") +
> scale_color_manual(values = colors)+
>
> ggtitle("OTC Derivative")+
> theme(panel.background = element_rect(fill="white", colour="white", size=0.5,
> linetype="solid", color="black"),
> plot.title = element_text(hjust = 0.5),
> panel.grid.minor = element_line(size = (0.2), colour="grey"),
> panel.grid.major = element_line(colour ="grey",size = (0.1)),
> axis.text.x=element_text(angle=60, hjust=1),
> legend.title = element_text(size=12, face="bold"))
````Preformatted text`
Please help