dotplot {broman} | R Documentation |
Dot chart with a gray background
Description
Like the grayplot()
function, but with one axis assumed to be categorical.
Usage
dotplot(group, y, jiggle = NULL, max_jiggle = 0.45, rotate = FALSE, ...)
Arguments
group |
Categorical coordinates for the plot |
y |
Coordinates of points in the plot |
jiggle |
Vector of amounts to jiggle the points horizontally,
or a character string ( |
max_jiggle |
Maximum jiggle value; passed to |
rotate |
If TRUE, have group as y-axis; default (FALSE) has group on x-axis. |
... |
Optional graphics arguments |
Details
Calls grayplot()
with special choices of
graphics parameters for the case of categorical x.
If group
is a factor, the order of the groups is as in the
levels. Otherwise, we take sort(unique(group))
. So if you want to
control the order of the levels, make group
a factor with the levels
in the desired order, for example group <- factor(group, levels=unique(group))
.
Value
None.
See Also
Examples
x <- rnorm(40, c(1,3))
g <- rep(c("A", "B"), 20)
dotplot(g, x)
dotplot(g, x, "fixed")
dotplot(g, x, runif(length(g), -0.25, 0.25))