# Flip image in makie.jl

**URL:** <https://discourse.julialang.org/t/flip-image-in-makie-jl/83278>\
**Category:** New to Julia\
**Created:** [June 23, 2022, 7:54pm UTC](https://discourse.julialang.org/t/flip-image-in-makie-jl/83278 "2022-06-23T19:54:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adi\_Rai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adi_rai/32/34413_2.png) [@Adi\_Rai](https://discourse.julialang.org/u/Adi_Rai)\
**Post date:** [June 23, 2022, 7:54pm UTC](https://discourse.julialang.org/t/flip-image-in-makie-jl/83278/1 "2022-06-23T19:54:13Z")

</div>

Hi everyone,

I am trying to plot an image in Makie.jl however the image I get is flipped (both vertically and horizontally) for some reason. However when I plot the image in Plots.jl I get the perfect output.

The image output I get:

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

  
The image output I want:

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

Any help would be appreciated, thanks.

---

<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:** [June 23, 2022, 8:09pm UTC](https://discourse.julialang.org/t/flip-image-in-makie-jl/83278/2 "2022-06-23T20:09:06Z")

</div>

Check the example here

[https://makie.juliaplots.org/stable/examples/plotting\_functions/image/#examples](https://makie.juliaplots.org/stable/examples/plotting_functions/image/#examples)

The reason it works like this is that the first dimension of the image matrix is mapped to x and the second to y just like all other plotting functions. But arguably there should be an option to change that behavior

---

<div class="post-metadata">

**Author:** ![Adi\_Rai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adi_rai/32/34413_2.png) [@Adi\_Rai](https://discourse.julialang.org/u/Adi_Rai)\
**Post date:** [June 23, 2022, 9:45pm UTC](https://discourse.julialang.org/t/flip-image-in-makie-jl/83278/3 "2022-06-23T21:45:46Z")

</div>

Thanks for your reply, I was able to figure it out!

---

<div class="post-metadata">

**Author:** ![Adi\_Rai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adi_rai/32/34413_2.png) [@Adi\_Rai](https://discourse.julialang.org/u/Adi_Rai)\
**Post date:** [June 23, 2022, 10:16pm UTC](https://discourse.julialang.org/t/flip-image-in-makie-jl/83278/4 "2022-06-23T22:16:15Z")

</div>

I was able to get my exact image, using this code:

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

and the respective output is:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/f/a/fa47aefd183e260ee3228e04a6af3e49b8c1a1ba.jpeg)

however when I try to reverse the yaxis image again gets flipped:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/c/8/c85ce019f9a066a0d720b5bd05a58269f55828a3.jpeg)

How do I reverse the yaxis without flipping the image.

---

<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:** [June 24, 2022, 5:12am UTC](https://discourse.julialang.org/t/flip-image-in-makie-jl/83278/5 "2022-06-24T05:12:42Z")

</div>

That should be the cow on the lower right
