Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New beeswarm algorithm #27

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

New beeswarm algorithm #27

wants to merge 7 commits into from

Conversation

jkrumbiegel
Copy link
Member

I noticed that the default algorithm is a bit buggy with overlaps, and it doesn't look ideal in the places without overlaps either. So I came up with my own version (I'm sure I just reinvented one of the ones out there, but whatever, was a fun exercise).

This one's as quick as the default but looks much more even, without overlaps.

Before

Random.seed!(1233); beeswarm(fill(1, 2000), randn(2000), markersize = 5.5, alpha = 0.5, direction = :x)
grafik
Random.seed!(1233); beeswarm(fill(1, 200), randn(200), markersize = 18, alpha = 0.5, direction = :x, marker = Circle)
grafik

After

Random.seed!(1233); beeswarm(fill(1, 2000), randn(2000), markersize = 5.5, alpha = 0.5, direction = :x, algorithm = SwarmMakie.SimpleBeeswarm2())
grafik
Random.seed!(1233); beeswarm(fill(1, 200), randn(200), markersize = 18, alpha = 0.5, direction = :x, marker = Circle, algorithm = SwarmMakie.SimpleBeeswarm2())
grafik

@jkrumbiegel jkrumbiegel requested a review from asinghvi17 October 9, 2024 09:26
@jkrumbiegel
Copy link
Member Author

This includes commits from #26 so that one should be merged first

@@ -0,0 +1,127 @@
struct SimpleBeeswarm2 <: BeeswarmAlgorithm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we rename this? Maybe make this SimpleBeeswarm and rename the current default?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think that would be good. Do you actually still want to keep the current default given that it causes overlaps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants