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

Violin plot: avoid cropping long tick labels #2302

Open
Tracked by #2311 ...
vladsavelyev opened this issue Feb 8, 2024 · 0 comments
Open
Tracked by #2311 ...

Violin plot: avoid cropping long tick labels #2302

vladsavelyev opened this issue Feb 8, 2024 · 0 comments

Comments

@vladsavelyev
Copy link
Member

vladsavelyev commented Feb 8, 2024

It's the xaxis.automargin parameter that usually controls if Plotly should account for the tick length when calculating the plot height, so they are not cropped. Unfortunately, it does it by taking space from the allocated layout.height instead of adding more height. This is usually okay for other plot types, where we don't mind them squishing a bit. However, for the violins, we build them by stacking multiple subplots, and when we have a lot of thin violins, adding space to one of them to fit the labels will squash all other violins too much, making them unreadable. Also, Plotly will only expand space for the bottom violin, ignoring the rest. So we need to find a workaround to add space for long tick labels, but keep the actual violins constant height.

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

No branches or pull requests

1 participant