View source: R/regimented_scatter.R
regimented_jitter | R Documentation |
Adds points to boxplots in a regimented way
regimented_jitter(x, y, diameter = 1, ...)
x |
A scalar number; the x-value in the plot |
y |
A numeric vector; the values to be jittered regimentally |
diameter |
A scalar number; controls the diameter of the circles in the plot |
... |
Parameters which are sent to the |
Returns invisibly cbind(y, jitter_x, jitter_y) where y is the original data and jitter_x and jitter_y are the jittered centers in the plot.
set.seed(2346)
y <- rnorm(123)
boxplot(y)
regimented_jitter(1, y, bg = "gray80")
boxplot(y)
regimented_jitter(1, y, diameter = 1.5, bg = "gray80")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.