position_jitter

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

Jitter points to avoid overplotting

This page describes position_jitter, 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

> qplot(am, vs, data=mtcars) 
  
>  
> # Default amount of jittering will generally be too much for 
> # small datasets: 
> qplot(am, vs, data=mtcars, position="jitter") 
  
> # Control the amount as follows 
> qplot(am, vs, data=mtcars, position=position_jitter(w=0.1, h=0.1)) 
  
>  
> # The default works better for large datasets, where it will 
> # will up as much space as a boxplot or a bar 
> qplot(cut, price, data=diamonds, geom=c("boxplot", "jitter")) 
  

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