I want to color only one bar in ggplot. This is my data frame:
area <- c("Pó?noc", "Po?udnie", "Wschód", "Zachód")
sale <- c(16.5, 13.5, 14, 13)
df.sale <- data.frame(area, sale)
colnames(df.sale) <- c("Obszar sprzeda?y", "Liczba sprzedanych produktów (w tys.)")
And code for plotting:
plot.sale.bad <- ggplot(data=df.sale, aes(x=area, y=sale, fill=area)) +
geom_bar(stat="identity") +
scale_fill_manual(values=c("black", "red", "black", "black")) +
xlab(colnames(df.sale)[1]) +
ylab(colnames(df.sale)[2]) +
ggtitle("Porównanie sprzeda?y")
I would like to have only one bar colored and 3 others to have default color (darkgrey, not black, it looks bad for me). How can I change color of only on bar or how to get name of the default color of bars to put them instead of black?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…