# Makie reverse axis

**URL:** https://discourse.julialang.org/t/makie-reverse-axis/55756
**Category:** General Usage
**Created:** [February 22, 2021, 2:11am UTC](https://discourse.julialang.org/t/makie-reverse-axis/55756 "2021-02-22T02:11:52Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![neuralian](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/neuralian/32/8859_2.png) [@neuralian](https://discourse.julialang.org/u/neuralian)
#### Post date: [February 22, 2021, 2:11am UTC](https://discourse.julialang.org/t/makie-reverse-axis/55756/1 "2021-02-22T02:11:52Z")

</div>

How do I reverse an axis in a Makie scene (figure)? The documentation says " You can manually reverse an axis by setting `ax.xreversed = true` or `ax.yreversed = true` ", but …

```julia
fig = Figure()
ax = fig[1,1]
...
ax.xreversed = true
ERROR: type FigurePosition has no field xreversed

```

---

<div class="post-metadata">

### Author: ![neuralian](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/neuralian/32/8859_2.png) [@neuralian](https://discourse.julialang.org/u/neuralian)
#### Post date: [February 22, 2021, 2:25am UTC](https://discourse.julialang.org/t/makie-reverse-axis/55756/2 "2021-02-22T02:25:44Z")

</div>

… the solution is to create an axis object like this:

```julia
fig = Figure(resolution = (800,600))
fig[1,1] = ax = Axis(fig)

...

```

Now ax.xreversed = true works.

---

<div class="post-metadata">

### Author: ![martinmestre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/martinmestre/32/215857_2.png) [@martinmestre](https://discourse.julialang.org/u/martinmestre)
#### Post date: [October 5, 2022, 3:04pm UTC](https://discourse.julialang.org/t/makie-reverse-axis/55756/3 "2022-10-05T15:04:47Z")

</div>

Hello @neuralian, I am trying to do that but obtain a duplicated axis. Could you point me to any source where you learned of:  
`fig[1,1] = ax = Axis(fig)`  
How is the double `=` interpreted in julia ?  
Thanks!

---

<div class="post-metadata">

### Author: ![neuralian](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/neuralian/32/8859_2.png) [@neuralian](https://discourse.julialang.org/u/neuralian)
#### Post date: [October 5, 2022, 8:36pm UTC](https://discourse.julialang.org/t/makie-reverse-axis/55756/4 "2022-10-05T20:36:05Z")

</div>

a=b=c  
is equivalent to  
b=c  
a=b

so  
fig[1,1] = ax = Axis(fig)  
creates an axis within fig, calls it ‘ax’ and places it in the top left of the figure.

If you already have an axis object then  
ax.reversed = true  
should just work.

---

<div class="post-metadata">

### Author: ![martinmestre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/martinmestre/32/215857_2.png) [@martinmestre](https://discourse.julialang.org/u/martinmestre)
#### Post date: [October 6, 2022, 2:40pm UTC](https://discourse.julialang.org/t/makie-reverse-axis/55756/5 "2022-10-06T14:40:34Z")

</div>

Thanks!
