I am a newbie to R, so please pardon my ignorance. I made a pseudo-stacked barplot in which I drew 4 sets of bars on top of each other using geom_bar. There are 4 health sta
You need to reshape your data.
library(reshape)
library(ggplot2)
x <- as.data.frame(list(variable=c("QUAG", "QUKE", "QUCH"), alive = c(627,208,109), infected = c(102,27,0), dead = c(133,112,12), sod.dead=c(49,8,0)))
x <- melt(x)
colnames(x) <- c("Type","Status","value")
ggplot(x, aes(Type, value, fill=Status)) + geom_bar(position="stack")