View source: R/position-jitter-ellipse.R
| position_jitterdodge_ellipse | R Documentation |
This function dodges groups of points side-to-side and adds elliptical random noise to perfectly over-plotted points. See the position_jitter_ellipse() documentation for more information.
position_jitterdodge_ellipse(
jitter.width = NULL,
jitter.height = NULL,
dodge.width = 1,
seed = NA
)
jitter.width, jitter.height |
The dimensions of the elliptical field, from which over-plotted points are sampled. |
dodge.width |
The dodging width, which defaults to 1. |
seed |
A random seed for reproducibility. |
A ggproto object of class PositionJitterdodgeEllipse.
Other Functions:
position_circlepack(),
position_circlepackdodge(),
position_jitter_ellipse(),
position_sunflower(),
position_sunflowerdodge(),
sunflower()
library(ggplot2)
dat <- data.frame(x = rep(1, 500), y = rep(1, 500),
group = sample(LETTERS[1:2], 500, replace = TRUE))
ggplot(dat, aes(x, y, shape = group, color = group)) +
geom_point(position = position_jitterdodge_ellipse(jitter.width = 0.5,
jitter.height = 0.5,
dodge.width = 1)) +
coord_cartesian(xlim = c(0, 2), ylim = c(0, 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.