position_stack

position_stack(width=NULL, height=NULL, ...)

Stack overlapping objects on top of one another

This page describes position_stack, see layer and qplot for how to create a complete plot from individual components.

What do you think of the documentation? Please let me know by filling out this short online survey.

Parameters

Parameters control the appearance of the position. In addition to the parameters listed below (if any), any aesthetic can be used as a parameter, in which case it will override any aesthetic mapping.

Returns

This function returns a position object.

Examples

> # See ?geom_bar and ?geom_area for more examples 
> ggplot(mtcars, aes(x=factor(cyl), fill=factor(vs))) + geom_bar() 
  
>  
> ggplot(diamonds, aes(x=price)) + geom_histogram(binwidth=500) 
  
> ggplot(diamonds, aes(x=price, fill=cut)) + geom_histogram(binwidth=500) 
  

What do you think of the documentation? Please let me know by filling out this short online survey.