eclarke / ggbeeswarm

Column scatter / beeswarm-style plots in ggplot2
GNU General Public License v3.0
531 stars 31 forks source link

Support beeswarm spacing parameter #81

Closed FunkMonkey closed 1 year ago

FunkMonkey commented 1 year ago

Beeswarm supports a spacing parameter to control the "Relative spacing between points". It would be nice if geom_beeswarm could forward the spacing parameter as well.

Thanks a lot!

csdaw commented 1 year ago

You can control the spacing with the cex argument. You can then increase point size using the size argument.

Hope this helps.

library(ggbeeswarm)
#> Loading required package: ggplot2

ggplot(ToothGrowth, aes(x = supp, y = len)) +
  geom_beeswarm() + 
  theme_bw(base_size = 14)


ggplot(ToothGrowth, aes(x = supp, y = len)) +
  geom_beeswarm(cex = 4) + 
  theme_bw(base_size = 14)


ggplot(ToothGrowth, aes(x = supp, y = len)) +
  geom_beeswarm(cex = 4, size = 4) + 
  theme_bw(base_size = 14)

Created on 2023-04-22 with reprex v2.0.2