Skip to content

Colorbar is not showing last tick #5066

@ccpjulia

Description

@ccpjulia

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2considered for next cyclebugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions