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

Colorbar is not showing last tick #5066

Open
ccpjulia opened this issue Mar 6, 2025 · 2 comments
Open

Colorbar is not showing last tick #5066

ccpjulia opened this issue Mar 6, 2025 · 2 comments
Labels
bug something broken P2 considered for next cycle

Comments

@ccpjulia
Copy link

ccpjulia commented Mar 6, 2025

Hi,
I have added a horizontal colorbar to a heatmap figure and can't get the last tick to show. Here are some of things I tried and thought are the most logical:

colorbar= dict(
            orientation='h',
            y=1.01,
            tickformat=".0%",
            tickmode='array',
            tickvals=[0, 0.25, 0.5, 0.75, 1],
            showticksuffix='last',
            ), 

and

colorbar= dict(
            orientation='h',
            y=1.01,
            tickformat=".0%",
            tickmode='linear',
            tick0=0,
            dtick=0.25,
            nticks=5,
            ticklabeloverflow="allow",
            ), 

but both yield the same result:
Image

I have also tried moving the bar around the x axis and played with labels and length, but it always seems missing.

Is this a bug?

Plotly: 5.24.1 and Python: 3.12.7

@gvwilson gvwilson added bug something broken P2 considered for next cycle labels Mar 7, 2025
@gvwilson
Copy link
Contributor

gvwilson commented Mar 7, 2025

Thanks for spotting this @ccpjulia - I believe it's a bug, and I'll try to get someone to look at it in an upcoming work cycle. Thanks - @gvwilson

@ccpjulia
Copy link
Author

Lovely thanks @gvwilson. I also realised a couple of things that might help. In the heatmaps itself there is no 100% (only 99 ish), which I think is causing this. Yet, when I specify the array I would expect it to show regardless. Even with that in mind and not specifying any ticks it will still not show any last value.

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

No branches or pull requests

2 participants