heatmaps hide data if any X- or Y-axis label is repeated (px.imshow and go.Heatmap)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 18.8k
- Forks
- 2.8k
- Avg merge
- 16h 26m
- Merged PRs (30d)
- 21
Description
This example is from Customizing the axes and labels on a heatmap:
import plotly.express as px
data=[[1, 25, 30, 50, 1], [20, 1, 60, 80, 30], [30, 60, 1, 5, 20]]
fig = px.imshow(data,
labels=dict(x="Day of Week", y="Time of Day", color="Productivity"),
x=['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],
y=['Morning', 'Afternoon', 'Evening'])
fig.show()
If you change "Friday" to "Monday", or "Evening" to "Morning", the row or column with the repeated label disappears. The same thing happens with go.Heatmap on the same page.
I don't think I read anywhere that labels must be unique, and all the examples suggest that the labels are arbitrary strings. If they must be unique, reporting an error seems more rational than hiding data.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided px.imshow example, changing Friday or Evening to a repeated label, and reproduce the missing row or column. Compare the behavior with go.Heatmap using the same data; done means repeated labels no longer silently hide data, or a clear error reports that they are unsupported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100