Why does the heatmap() function in Plots.jl flip data?

julia> A = [1 2 3;4 5 6;7 8 9]
3×3 Matrix{Int64}:
 1  2  3
 4  5  6
 7  8  9

julia> heatmap(A)

plot_9

Some plotting packages have this default and some do the other way around with good arguments for both positions. I think there is no a definitive best choice, it just takes getting used to. See related discussion here Axes swapped in heatmap · Issue #273 · JuliaPlots/Plots.jl · GitHub and links therein.

1 Like