Skip to content

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

Open
@my-tien

Description

@my-tien

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

Activity

added a commit that references this issue on May 6, 2025
150ccd3
added
bugsomething broken
communitycommunity contribution
P2considered for next cycle
cscustomer success
on May 8, 2025
AdityaSavara

AdityaSavara commented on May 26, 2025

@AdityaSavara

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

my-tien commented on May 26, 2025

@my-tien
ContributorAuthor

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

AdityaSavara commented on May 26, 2025

@AdityaSavara

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2considered for next cyclebugsomething brokencommunitycommunity contributioncscustomer success

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @gvwilson@my-tien@AdityaSavara

        Issue actions

          Hidden ticklabels with ticklabelposition "inside" take up plot space · Issue #7416 · plotly/plotly.js