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

Proposal for Beeswarm to overlap points when out of space #3744

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tvarovski
Copy link

Added option (keep_gutters) to Beeswarm plots (swarmplot, catplot) which when set to False, will iteratively decrease the distance between the points by 10% until no more gutters are present.

Example 1

plt.figure(figsize=(4, 4)) # set figure size
swarmplot(data=tips, x="size", y="total_bill", hue="size", alpha=0.7, palette='viridis', keep_gutters=False)

betterbeeswarm

Example 2

catplot(
    data=tips, kind="swarm", x="time", y="total_bill", hue="sex",
    col="day", aspect=0.6, height=2.5, alpha=0.7, size=5, keep_gutters=False)

betterbeeswarm_cat

@EwoutH
Copy link
Contributor

EwoutH commented Aug 11, 2024

I think this would be a great option to have in Seaborn!

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