# Wrong heatmap orientation with Plots.jl

**URL:** <https://discourse.julialang.org/t/wrong-heatmap-orientation-with-plots-jl/124822>\
**Category:** Visualization\
**Tags:** plots, makie\
**Created:** [January 16, 2025, 10:00am UTC](https://discourse.julialang.org/t/wrong-heatmap-orientation-with-plots-jl/124822 "2025-01-16T10:00:18Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [January 16, 2025, 10:56am UTC](https://discourse.julialang.org/t/wrong-heatmap-orientation-with-plots-jl/124822/9 "2025-01-16T10:56:50Z")

</div>

> [@mkborregaard](#):
>
> Makie uses the idea that a heatmap is a matrix, so uses the default way of displaying matrices with the first dimension being rows going down.

That’s not true, Makie uses first dim → x, second dim → y for everything, which is why images are not correctly oriented by default.

```julia
julia> heatmap([
           1 2
           3 4
       ], colormap = [:red, :green, :blue, :orange])

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/5/b/5bff9a44bf8aeb6005e6275b39119f801cb63678.png)

To get the expected orientation for images, you have to do something like this:

```julia
julia> heatmap([
           1 2
           3 4
       ]', colormap = [:red, :green, :blue, :orange], axis = (; yreversed = true))

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/c/0/c0e6ed0ea32b70fc641d67d64806a49d623a0b3f.png)

---

_[View the full topic](https://discourse.julialang.org/t/wrong-heatmap-orientation-with-plots-jl/124822)._
