geom_dotplot(mapping = NULL, data = NULL, position = "identity",
binwidth = NULL, binaxis = "x", method = "dotdensity",
binpositions = "bygroup", stackdir = "up", stackratio = 1,
dotsize = 1, stackgroups = FALSE, origin = NULL, right = TRUE,
width = 0.9, drop = FALSE, na.rm = FALSE, show.legend = NA,
inherit.aes = TRUE, ...)
method
is "dotdensity", this specifies maximum bin
width. When method
is "histodot", this specifies bin width.
Defaults to 1/30 of the range of the datamethod
is "dotdensity", "bygroup" (default)
determines positions of the bins for each group separately. "all" determines
positions of the bins with all the data taken together; this is used for
aligning dot stacks across multiple groups.binwidth
, default 1.position = "stack"
should have, but can't (because this geom has
some odd properties).method
is "histodot", origin of first binmethod
is "histodot", should intervals be closed
on the right (a, b], or not [a, b)binaxis
is "y", the spacing of the dot stacks
for dodging.FALSE
(the default), removes missing values with
a warning. If TRUE
silently removes missing values.NA
, the default, includes if any aesthetics are mapped.
FALSE
never includes, and TRUE
always includes.FALSE
, overrides the default aesthetics,
rather than combining with them. This is most useful for helper functions
that define both data and aesthetics and shouldn't inherit behaviour from
the default plot specification, e.g.
layer
. There are
three types of arguments you can use here:
color = "red"
orsize = 3
.binwidth
, which is the maximum width of each bin. See Wilkinson
(1999) for details on the dot-density binning algorithm.With histodot binning, the bins have fixed positions and fixed widths, much like a histogram.
When binning along the x axis and stacking along the y axis, the numbers on y axis are not meaningful, due to technical limitations of ggplot2. You can hide the y axis, as in one of the examples, or manually scale it to match the number of dots.