I have a complicated scatterplot that has a legend that is not correctly ordered.
sample of my data: Sample of my data from excel I have used the following code to generate my graph and order the category "Day"
Day <- factor(Day, levels = c("One", "Five", "Ten", "Fifteen", "Twenty"))
ggplot(Exp6data, aes(x=Temperature, y=Age, color = Day, shape = Day, fill = Day)) +
geom_point(aes(size=Day)) +
geom_smooth(method = lm, se = FALSE, fullrange = FALSE) +
labs(x="Temperature",y="Age - Legend") +
scale_shape_manual(values=c(18,1,15,4,17)) +
scale_size_manual(values=c(3,3,3,3,3)) +
scale_color_manual(values=c('#696969', '#A9A9A9', '#C0C0C0', '#808080', '#000000')) +
scale_fill_discrete(breaks=c('One', 'Five', 'Ten', 'Fifteen', 'Twenty')) +
theme_classic()
My graph generated from my data - with two different legends present
Thank you in advance for any useful advice.