Skip to content

Heatmap categorical axis not recognized as categorical #1510

@plpla

Description

@plpla

I was trying to create an heat-map offline and the categorical axis is not recognized properly.
In the following example, the X axis is interpreted as numerical values and the heat-map is empty.

import plotly.graph_objs as go
from plotly.offline import init_notebook_mode, iplot
import plotly
print(plotly.__version__)    #3.7.1
init_notebook_mode()

trace = go.Heatmap(z=np.random.rand(2, 9), y=["A", "B"], x=["1E1", "2A1", "3E2", "2A2", "1A1", "3A1", "1E2", "3E3", "1A2"],  colorscale="Viridis")
iplot([trace])

Empty

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