JuliaPlots / JuliaPlots/PlotlyJS.jl
`heatmap` flips rows/columns
- Dominant language
- Julia
- Stars
- 444
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Description
The `heatmap` plot type is useful for visualizing a matrix, but the cells are all transposed relative to how matrices are represented at the REPL. Additionally it is flipped so that index (1, 1) is at the bottom-left.
For Example:
``` julia
plot(heatmap(z=reshape(1:12, 3, 4)))
```
Shows this:

The plotly.js docs don't seem to specify whether they expect row-major or column-major 2D arrays, but empirically they treat them as row-major. JSON.jl renders 2D matrices as column-major. It's always a tough call to decide when it's worth adding extra processing between PlotlyJS.jl and plotly.js, but in this case the behavior seems to be something of an implementation detail that it would be OK to change.
I'm a little more torn on the origin location (bottom-left vs. top-left) as that's a user-visible change that would make it behave differently than plotly.js.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.