Hi all
I have issues generating two legends in the same plot. Down you can see the original code and I tried several ways how to implement a second legend, which will indicate my two geom_line and geom_point. Until now I was just able to generate a legend with the arrow color. With some ways I think I generated a seperate legend, but it did not show up even I did not receive an error message.
Could you help me please generate the second legend? I would be very thankful.
ggplot(data = dat, aes(x = Tag)) +
geom_segment(data = dat,
size = 0.75,
aes(x = Tag,
xend = x.end,
y = 30,
yend = y.end,
color = Windgeschwindigkeit),
arrow = arrow(length = unit(0.15, "cm"))) +
scale_colour_gradient(low="green", high="red") +
ylim(-5, 100) +
ggtitle("Meteorologische Umstände") +
ylab("Temperatur °C, Feuchtigkeit in %")+
geom_line(aes(y = Temp), color = "red", size = 1)+
geom_point(aes(y=Regen), color = "blue")+
geom_line(aes(y=Feucht), size = 1)+
theme_minimal()
Thanks a lot and stay safe!
Greetings
Yves