Skip to content

Gibberish / malformed / strange negative y-axis values  #4118

Closed
@valankar

Description

@valankar
#!/usr/bin/env python3
"""Test negative bug."""

from plotly.subplots import make_subplots

fig = make_subplots(rows=1, cols=1)
fig.add_bar(x=[1, 2, 3], y=[-4, 5, -6], row=1, col=1)
fig.update_layout(height=400, width=500, showlegend=True)

with open('web/negative.html', 'w', encoding='utf-8') as index_file:
    index_file.write(fig.to_html(full_html=False))

This results in:

neg

When I change to full_html=True, it works properly:

pos

This seems to be a recent bug because it worked fine before I upgraded Plotly. I’m using this version from conda-forge:

plotly 5.13.1 pyhd8ed1ab_0 conda-forge

More details on this issue:

https://community.plotly.com/t/gibberish-malformed-negative-y-axis-values-in-plotly-charts-in-python/71924/1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions