I have this numeric variable 1:5, in my dataset D. I want to make a barplot, using the geom_bar function in ggplot, and change the colors of the bars, så each of the five bars have a different color.
I've tried to use the scale_fill_manual,
but that does not seem to work, and I've also tried to use fill inside my aes which neither works. I seems like the bars continues to be grey, no matter what I try.
My basic code to make the plot are:
ggplot(D, aes(x = I_imp)) +
scale_x_continuous(breaks = c(1, 2, 3, 4, 5),
labels = c("No Importance",
"Very Low",
"Somewhat Low",
"Somewhat High",
"Very High")) + geom_bar()
I want each of the 5 bars to be in different color. But how??
Thank you!