Skip to content

Non-unique x/y labels disappear in heatmap #930

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

Closed
bastings opened this issue Feb 2, 2018 · 1 comment
Closed

Non-unique x/y labels disappear in heatmap #930

bastings opened this issue Feb 2, 2018 · 1 comment

Comments

@bastings
Copy link

bastings commented Feb 2, 2018

For some use cases of using heat maps, column/row labels are not uniqu. E.g. in machine translation, an alignment between two sentences is often expressed as a heatmap where a certain word can appear multiple times on an axis.

Steps to see the issue:

import plotly.plotly as py
import plotly.graph_objs as go

trace = go.Heatmap(z=[[1, 20, 30, 50, 1], [20, 1, 60, 80, 30], [30, 60, 1, -10, 20]],
                   x=['A', 'B', 'B', 'C', 'D'],
                   y=['X', 'Y', 'Z'])
data=[trace]
py.iplot(data, filename='labelled-heatmap')

Here one label 'B' disappears and subsequent labels are mis-aligned.
It would be great if this can be fixed, so that the result would be labels['A', 'B', 'B', 'C', 'D']

@jonmmease
Copy link
Contributor

Hi @bastings, thanks for the report! This would need to be handled in Plotly.js, so I'm going to close this as a duplicate of plotly/plotly.js#1516, where there's been quite a bit of discussion on this already. Feel free to add to that issue if you have concerns/use-cases that aren't covered. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants