Skip to content

different behavior for .show() and .write_image() with ticksuffix/tickprefix #4678

Open
@StephaneBranly

Description

@StephaneBranly

I noticied two different behavior while using (ticksuffix or tickprefix) and tickvals parameter to update an axis when I want to display or save the graph.

Plotly version : 5.22.0

Reproduction code :

import plotly.graph_objects as go
fig = go.Figure(
    data=[go.Bar(x=[1,2], y=[2,3]),],
    layout=dict(xaxis=dict(tickvals=[1,2],tickprefix='a', ticksuffix='b'))
)
fig.show()
fig.write_image(f"graphs/test.png", format="png")

.show() output :
image

.write_image() output :
test

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