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

**URL:** <https://discourse.julialang.org/t/why-does-the-heatmap-function-in-plots-jl-flip-data/69844>\
**Category:** General Usage\
**Tags:** plots\
**Created:** [October 15, 2021, 5:18pm UTC](https://discourse.julialang.org/t/why-does-the-heatmap-function-in-plots-jl-flip-data/69844 "2021-10-15T17:18:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thompsonmj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thompsonmj/32/25172_2.png) [@thompsonmj](https://discourse.julialang.org/u/thompsonmj)\
**Post date:** [October 15, 2021, 5:18pm UTC](https://discourse.julialang.org/t/why-does-the-heatmap-function-in-plots-jl-flip-data/69844/1 "2021-10-15T17:18:10Z")

</div>

```julia
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](https://global.discourse-cdn.com/julialang/original/3X/f/6/f669a625c2b3087b9d020a82735d5c44c9525d6e.png)

---

<div class="post-metadata">

**Author:** ![aramirezreyes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aramirezreyes/32/42573_2.png) [@aramirezreyes](https://discourse.julialang.org/u/aramirezreyes)\
**Post date:** [October 15, 2021, 5:35pm UTC](https://discourse.julialang.org/t/why-does-the-heatmap-function-in-plots-jl-flip-data/69844/2 "2021-10-15T17:35:52Z")

</div>

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 [https://github.com/JuliaPlots/Plots.jl/issues/273](https://github.com/JuliaPlots/Plots.jl/issues/273) and links therein.
