Trying to keep filled bars in a faceted plot

Posted by John Horton on Stack Overflow See other posts from Stack Overflow or by John Horton
Published on 2010-04-21T18:52:14Z Indexed on 2010/04/21 18:53 UTC
Read the original article Hit count: 253

Filed under:
|

Not sure what I'm doing wrong here. I have this plot:

ggplot(data.PE5, aes(ybands,fill=factor(decide))) + geom_bar(position="dodge") 

which produces:

Then I want to facet by a factor, creating two stacked plots w/ dodged, colored bars

ggplot(data.PE5, aes(ybands,fill=factor(decide))) + geom_bar(position="dodge") + 
facet_grid(~group_label) 

However, I lose the factor-based coloring, which I want to keep:

© Stack Overflow or respective owner

Related posts about r

    Related posts about ggplot2