Closed jtrim-ons closed 1 year ago
@csdaw would you have any interest in having a go at this? It would be amazing if you did feel like implementing it, as you know much more about ggbeeswarm and ggplot than I do.
The R version from the beeswarm package is here. (The default implementation is actually in C; the main part of that version is here.)
@jtrim-ons Yep I'd be happy to add the compactswarm
method in a future PR. ggbeeswarm
definitely still depends on beeswarm
so it should be easy enough to incorporate this new method.
@csdaw amazing - thank you! Let me know if there's anything I can do to help.
It would be great if the README could include an example (or more) of the compact beeswarm after you've added the code to the package. Again, I'd be happy to help with this if you'd like me to. I think the compact swarm would improve the "With automatic dodging" example in particular.
I was also wondering about what the API might look like... I guess options include adding another parameter to geom_beeswarm
or creating a new geom_compactswarm
function. I don't really have an opinion about this, but it would be really nice if the existence of the compact beeswarm is made fairly obvious to users. I guess that's what the README is for!
Thanks again for offering to write the code.
compactswarm
has just been added to ggbeeswarm2
, see https://github.com/csdaw/ggbeeswarm2/issues/1.
We recently added a new
"compactswarm"
method to thebeeswarm
package (version 0.4.0, on CRAN). We haven't yet added a vignette with nice examples, but you can see some examples in this issue. It's often seems to be quite a big improvement onmethod="swarm"
Asggbeeswarm
no longer depends onbeeswarm
, would it be worth adding an implementation of compact beeswarms?I might have time to help with this if you think it's a good plan. An alternative would be to depend on the
beeswarm
package for compact beeswarms. (An advantage of this is that thebeeswarm
package uses a fast C implementation.)