Hi Team,
I wrote the following code:
ggplot(try, aes(x = `_month`))+
geom_col(aes(y = Count), color="blue", fill="lightblue")+
geom_line(aes(y = Col_Rslt_TAT), color="#CC6666", linewidth = .8, group = 1) +
geom_line(aes(y = Rec_Rslt_TAT), color="#3399ff", linewidth = .8, group = 1) +
scale_color_manual(name = "Variable", values = c("Col_Rslt_TAT" = "#CC6666", "Rec_Rslt_TAT" = "#3399ff"), labels = c("Col_Rslt_TAT", "Rec_Rslt_TAT")) +
theme(legend.position="right")
In scale_color_manual part, I want to show a text box in right side to present the name of variable for each line. But it doesn't work and without error message.
Can you help me to fix the problem?
Thank you,
Kai