I am new to R. I am not sure why the order of legend is not ordered as expected.
ggplot() +
scale_color_manual(values = c("#D55E00","#009E73","#E69F00", "#0072B2")) +
geom_line(aes(y = linedataOne, x = timeSeries, colour = 'One'), data = linedataMulti) +
geom_line(aes(y = linedataTwo, x = timeSeries, colour = 'Two'), data = linedataMulti) +
geom_line(aes(y = linedataThree, x = timeSeries, colour = 'Three'), data = linedataMulti) +
geom_line(aes(y = linedataFour, x = timeSeries, colour = 'Four and more'), data = linedataMulti) +
labs(title = "Hourly Electricity Usage", x = "Hours in the day", y = "Kw/h", caption = "Data: Smart Meter Data")+
labs(colour = "Number of People")
I want the 'One' to be first then 'Two, 'three', etc. But, it is ordered by alphabetical order. Is there a way to order it by the sequence I added the line?