I have the following data:
data <- data.frame(
Category = c("A", "B", "C", "D"),
Count = c(23, 17, 35, 29)
)
Which I use to create the following bar-chart.
ggplot(data, aes(x = Category, y = Count, fill = Category)) +
geom_bar(stat = "identity", color = "black") +
labs(title = "Bar Chart Example", x = "Category", y = "Count") +
theme_minimal()
This all works. However I would like to recorder the bars. So the view i want to create is C, A, D, B. Can anybdoy tell me how I can do this?