View source: R/geom-quasirandom.R
| geom_quasirandom | R Documentation |
The quasirandom geom is a convenient shortcut for
geom_point(position = "quasirandom"). It shifts points to avoid
overplotting using the offsetSingleGroup function from the
vipor package.
geom_quasirandom( mapping = NULL, data = NULL, stat = "identity", ..., method = "quasirandom", width = NULL, varwidth = FALSE, bandwidth = 0.5, nbins = NULL, dodge.width = NULL, 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, as a string. |
... |
Other arguments passed on to |
method |
|
width |
|
varwidth |
|
bandwidth |
|
nbins |
|
dodge.width |
|
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
method: specifies the algorithm used to distribute the points.
"quasirandom": points are distributed within a kernel density estimate of
the distribution with offset determined by quasirandom Van de Corput noise.
"pseudorandom": points are distributed within a kernel density estimate of
the distribution with offset determined by pseudorandom noise a la jitter.
"maxout": points are distributed within a kernel density with points in a
band distributed with highest value points on the outside and lowest in
the middle.
"minout": points are distributed within a kernel density with points in a
band distributed with highest value points in the middle and lowest on
the outside.
"tukey": points are distributed as described in Tukey and Tukey,
"Strips displaying empirical distributions: I. textured dot strips".
"tukeyDense": points are distributed as described in Tukey and Tukey but
are constrained with the kernel density estimate.
geom_quasirandom() understands the following aesthetics (required aesthetics
are in bold):
x
y
alpha
colour
fill
group
shape
size
stroke
Learn more about setting these aesthetics in vignette("ggplot2-specs").
position_quasirandom() for the underlying function to this geom.
geom_beeswarm() for another method of shifting points to avoid
overplotting.
#
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.