Skip to content

Hidden ticklabels with ticklabelposition "inside" take up plot space #7416

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

Open
my-tien opened this issue May 6, 2025 · 3 comments
Open
Labels
bug something broken community community contribution cs customer success P2 considered for next cycle

Comments

@my-tien
Copy link
Contributor

my-tien commented May 6, 2025

In below image the upper subplot's y-axis takes up more horizontal space than the lower subplot's y-axis, because the upper subplot reserves space for a hidden longer label 100. Ideally, only visible labels should take up space.

Image

my-tien added a commit to my-tien/plotly.js that referenced this issue May 6, 2025
Hidden ticklabels don't take up space anymore.
@gvwilson gvwilson added bug something broken community community contribution P2 considered for next cycle cs customer success labels May 8, 2025
@AdityaSavara
Copy link

To me, this does not seem like a bug. To me, hidden means "no color". If someone wants the tickmark to be completely gone, the length of the tickmark can be set to 0.

I actually think it is worse if the hidden one causes the axis position to change, because that could affect the spacing of a plot when someone does not want the spacing to change.

@my-tien
Copy link
Contributor Author

my-tien commented May 26, 2025

To me, this does not seem like a bug. To me, hidden means "no color". If someone wants the tickmark to be completely gone, the length of the tickmark can be set to 0.

I actually think it is worse if the hidden one causes the axis position to change, because that could affect the spacing of a plot when someone does not want the spacing to change.

Note, this issue is not about ticks or tick labels that are intentionally hidden by choosing an invisible color for them. This is about tick labels that are not displayed because they don't fit into the existing space and ticklabeloverflow is not allow.

@AdityaSavara
Copy link

AdityaSavara commented May 26, 2025

Thank you for clarifying. Now I think I understand better what you mean. You're saying that in the upper plot, the value "100" has 3 digits and is hidden. So there are 3 digits of space reserved even though there is no "100". In contrast, in the lower plot, there is only 2 digits of space taken up because there is no "hidden" 3 digit number.

I am not sure I would call this a bug rather than an enhancement. However, I think I understand now. Thank you for clarifying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken community community contribution cs customer success P2 considered for next cycle
Projects
None yet
Development

No branches or pull requests

3 participants