ggbeeswarm icon indicating copy to clipboard operation
ggbeeswarm copied to clipboard

Swarms are asymmetrical

Open bersbersbers opened this issue 2 years ago • 2 comments

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))

plot

bersbersbers avatar Mar 11 '22 06:03 bersbersbers

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.

AmeliaMN avatar Aug 17 '22 17:08 AmeliaMN

I solved my own problem! The GitHub version of the package has method="center" although it seems like the CRAN version still does not.

AmeliaMN avatar Aug 17 '22 17:08 AmeliaMN