Skip to content

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