I'd like to have ordered bars in dodge geom_bar
. Do you know how to deal with it?
My code:
ttt <- data.frame(typ=rep(c("main", "boks", "cuk"), 2),
klaster=rep(c("1", "2"), 3),
ile=c(5, 4, 6, 1, 8, 7))
ggplot()+
geom_bar(data=ttt, aes(x=klaster, y=ile, fill=typ),
stat="identity", color="black", position="dodge")
And example plots to better understand the problem:
What I have:
What I would like to have: