position_stack

Stack overlapping objects on top of one another

Details

See layer and qplot for more information on creating a complete plot from multiple components.

Examples


> ggplot(mtcars, aes(x=factor(cyl), fill=factor(vs))) + geom_bar()


> 
> ggplot(diamonds, aes(x=price)) + geom_bar()


> ggplot(diamonds, aes(x=price, fill=cut)) + geom_bar()


>