Makie reverse axis

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 …

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

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

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


Now ax.xreversed = true works.

1 Like

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 ?

is equivalent to

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.