I am trying to customise the legends in my Shiny App, and am very close but when I use scale_colour_manual and scale_linetype_manual together the legends values end up in the format (legend value, 1), as per the screenshot below. You can also see the app here https://beniam.shinyapps.io/Alpine/
I am not sure why this happens or how to change them, when I have tried adding 'labels' or 'breaks' into the code it doesn't do anything.
My code is
#main chart
plot <- ggplot(data = alpine %>% filter(Year == input$yearvalue & Location == input$var5), aes(x = Date, y = Depth, colour = Type)) +
geom_point() +
ylim(0, 200) +
theme_minimal(base_size = 10) +
geom_smooth(color = 'Dodgerblue', method = 'gam', se = FALSE) +
scale_colour_manual(name = "Type of Snow", values=c("#99d8ff", "#2e4d82")) +
geom_hline(aes(yintercept= 100, linetype = "Current Year Mean"), colour= 'green') +
geom_hline(aes(yintercept= 80, linetype = "2010 Mean"), colour= 'black') +
scale_linetype_manual(name ="", values = c('dotted','dotted'))