I'm not sure if I'm understanding this correctly. Can't reproduce it as no data was provided. Not sure if guide_legend(reverse = TRUE)
is an answer you want.
library(tidyverse)
data <- tibble(x = c(1,2,3), y =c(4,5,6), class = c('a', 'b', 'c'))
ggplot(data = data, aes(x = x, y = y, color = class))+
geom_point()
library(tidyverse)
data <- tibble(x = c(1,2,3), y =c(4,5,6), class = c('a', 'b', 'c'))
ggplot(data = data, aes(x = x, y = y, color = class))+
geom_point()+
guides(color = guide_legend(reverse = TRUE))