I have to make a plot with multiple variables. All woks well exept my legend. The shape for each of the three variables are overlapping on each other in the legend. Here is my code :
colors <- c("Satr" = "blue", "Thth" = "red", "Abbr" = "darkgreen")
ggplot(data = Database, mapping = aes( x = Station,)) +
geom_point(aes(, y = Satr, color = "Satr"), size = 3,shape=0) +
geom_point(aes(, y = Thth, color = "Thth"), size = 3, shape=19) +
geom_point(aes(, y = Abbr, color = "Abbr"), size = 3.5, shape=5) +
theme_bw() +
scale_x_continuous(breaks=seq(0, 30, by = 1)) +
ggtitle(label = "Presence of the brown trout (Satr), grayling (Thth) and common bream (Abbr)
in the different stations of the Doubs river") +
theme(plot.title = element_text(hjust = 0.5)) +
ylab(label = "fish abundance" ) +
xlab(label = "Stations" ) +
labs(color = "Legend")+
scale_color_manual(values = colors)
I try to use scale_shapes_manual() but it didn't work.