stat_bindot {ggplot2} | R Documentation |
Missing values are currently silently dropped. If weights are used, they must be integer values.
stat_bindot(mapping = NULL, data = NULL, geom = "dotplot", position = "identity", binwidth = NULL, origin = NULL, width = 0.9, binaxis = "x", method = "dotdensity", binpositions = "bygroup", drop = FALSE, right = TRUE, na.rm = FALSE, ...)
binaxis |
The axis to bin along, "x" (default) or "y" |
method |
"dotdensity" (default) for dot-density binning, or "histodot" for fixed bin widths (like stat_bin) |
binwidth |
When |
binpositions |
When |
origin |
When |
right |
When |
width |
When |
na.rm |
If |
drop |
If TRUE, remove all bins with zero counts |
mapping |
The aesthetic mapping, usually constructed
with |
data |
A layer specific dataset - only needed if you want to override the plot defaults. |
geom |
The geometric object to use display the data |
position |
The position adjustment to use for overlappling points on this layer |
... |
other arguments passed on to
|
New data frame with additional columns:
x |
center of each bin, if binaxis is "x" |
y |
center of each bin, if binaxis is "x" |
binwidth |
max width of each bin if method is "dotdensity"; width of each bin if method is "histodot" |
count |
number of points in bin |
ncount |
count, scaled to maximum of 1 |
density |
density of points in bin, scaled to integrate to 1, if method is "histodot" |
ndensity |
density, scaled to maximum of 1, if method is "histodot" |
stat_bindot
understands the following aesthetics (required aesthetics are in bold):
x
y
See geom_dotplot
for examples.
# See geom_dotplot for examples