I have the following data and wish to create a grouped bar graph like so:
data<-as.data.frame(c(\"a\",\"b\",\"c\",\"a\",\"b\",\"c\")) colnames(data)<-\
You need to get group and fill mapped to the right variable:
group
fill
ggplot(data, aes(x=X, y=Z, group=Y, fill=X)) + geom_bar(stat="identity", colour="black", position="dodge", size=0.25, width=0.8, alpha=0.8) + scale_fill_manual(values=c("red","blue"))