Skip to content

Stacked Bar Plot in ggplot2

2 messages · Abraham Mathew, Justin Haynes

#
Abraham Mathew <abraham <at> thisorthat.com> writes:
Is: 
 ggplot(dat,aes(x=date))+geom_bar(aes(y=click),fill='red')+geom_bar(aes(y=conv),fill='blue')

what you're looking for?

or 

dat.melt<-melt(dat,'date')
ggplot(dat.melt,aes(x=date,y=value,fill=variable))+geom_bar()


Justin