Generation

generate functionTue, 18 Apr 2023

library(viridisLite) colors <- viridis(4) library(ggplot2) ggplot(df, aes(x = categorical_FOD_FODs, y = Frequency, fill = Condition_FODs)) + geom_bar(stat = "identity", position = position_dodge()) + scale_fill_manual(values = colors) + labs( x = "FODs (direction)", y = "Frequency of FODs", fill = "Conditions", title = "FODs values (ascending/descending) in four condition" ) + theme_minimal() + theme( plot.title = element_text(size = 14, face = "bold"), axis.title = element_text(size = 12, face = "bold"), axis.text = element_text(size = 10), legend.title = element_text(size = 10), legend.text = element_text(size = 10), panel.border = element_rect(color = "black", fill = NA, size = 1) ) I want to change the order of the Condition bars, manually as I wish. How can I do this?

Questions about programming?Chat with your personal AI assistant