Entering edit mode
2.9 years ago
j_weld
▴
10
I am calling the ggplot function
I am calling the ggplot function
You need to set the factor order for the Genus variable.
level_order <- c("Gilliamella", "Snodgrassella", "Bifidobacterium", "Lactobacillus", "Frischella")
data$Genus <- factor(data$Genus, levels=level_order)
The order might be backwards with the above code. If so change fill=Genus
to fill=forcats::fct_rev(Genus)
in your ggplot
command.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
j_weld : Please do not delete posts once they have received comments/answer. If the answer solved your problem appropriate way to acknowledge the help is to accept the answer (green check mark).