I am trying to synchronise the order of the legend with the bar plots in this picture. As you can see, "All Countries" label is the first in my legend yet in the bar plot I have it as last. I wish I correct the barplot and have the black bar plot labeled as 'All Countries" as first. Is there a way to fix it but with the caveat I keep the colour pallete since it is for partial 'colour blinded' people.
this is my code
cbbPalette <- c("#000000", "#E69F00", "#56B4E9", "#009E73", "#F0E442",
"#0072B2", "#D55E00", "#CC79A7", "#CC6600")
plot_adjusted_rates <- ggplot2::ggplot(adj_sympt_forcats,
ggplot2::aes(symptoms, age_standardise_rate_in_sympt, country)) +
ggplot2::coord_flip() +
ggplot2::geom_bar(ggplot2::aes(fill = country), width = 0.4,
position = position_dodge(width = 0.5), stat = "identity") +
ggplot2::scale_fill_manual(values = cbbPalette)
I have followed another example here: ggplot legend: change order of the automatic legend
Yet it does not correct it and messed my colour pallets. Does someone know how to correct this? Data can't be provided due to confidentiality of it.