geom_jitterd | R Documentation |
The jitterd geom adds a small amount of random variation to the location of each point, but that amount of noise is proportional to the density. In some ways, it's a mix between geom_jitter and geom_violin. It reduces overplotting caused by discreteness in smaller datasets. This function was adapted from geom_jitter within ggplot2
geom_jitterd(
mapping = NULL,
data = NULL,
stat = "identity",
position = "jitter",
...,
width = NULL,
height = NULL,
quad.points = 100,
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE
)
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
stat |
The statistical transformation to use on the data for this layer.
When using a
|
position |
A position adjustment to use on the data for this layer. This
can be used in various ways, including to prevent overplotting and
improving the display. The
|
... |
Other arguments passed on to
|
width , height |
Amount of vertical and horizontal jitter. The jitter is added in both positive and negative directions, so the total spread is twice the value specified here. If omitted, defaults to 40% of the resolution of the data: this means the jitter values will occupy 80% of the implied bins. Categorical data is aligned on the integers, so a width or height of 0.5 will spread the data so it's not possible to see the distinction between the categories. |
quad.points |
The number of "quadriture points" for the density function. Higher numbers yield a more detailed jittered density plot |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
a geom of jittered data
geom_point for regular, unjittered points, geom_boxplot for another way of looking at the conditional distribution of a variable geom_jitter for standard jittering
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.