Description Usage Arguments Examples
Spread Overlapping Grobs Spread overlapping groups by shrinking them to fit
within the data's y
range.
1 | position_spread(height = NULL, reverse = FALSE, padding = 0.2)
|
height |
One of |
reverse |
Reverse the order of segments within overlapping |
padding |
Multiple of height. Will shrink/enlarge groups to fit within a region. |
1 2 3 4 5 6 | library(ggplot2)
x <- data.frame(y = rnorm(1000), x="", myGroup=sample(1:3, 1000, TRUE))
ggplot(x, aes(x, y))+
geom_point(aes(group=myGroup), position=position_spread(height = 0.5))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.