ggbeeswarm
ggbeeswarm copied to clipboard
Swarms are asymmetrical
I would have expected the dots to be distributed equally around the center x = 1:
df <- data.frame(y = rep(1:10, 2))
ggplot2::ggplot(df, ggplot2::aes(1, y)) +
ggbeeswarm::geom_beeswarm(method="swarm") + # same with "square", "compactswarm"
ggplot2::coord_cartesian(xlim = c(0.9, 1.1))
Same! I thought I could use method = "center"
as seen in the README but I get Warning message: Ignoring unknown parameters: method
. That being said, even the examples in the README have cases with just two dots not centered, but groups with 3 or more centered.
I solved my own problem! The GitHub version of the package has method="center"
although it seems like the CRAN version still does not.