# Reversing Axis of the plot

**URL:** <https://discourse.julialang.org/t/reversing-axis-of-the-plot/58604>\
**Category:** General Usage\
**Created:** [April 5, 2021, 10:04am UTC](https://discourse.julialang.org/t/reversing-axis-of-the-plot/58604 "2021-04-05T10:04:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tgautam03](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tgautam03/32/20545_2.png) [@tgautam03](https://discourse.julialang.org/u/tgautam03)\
**Post date:** [April 5, 2021, 10:04am UTC](https://discourse.julialang.org/t/reversing-axis-of-the-plot/58604/1 "2021-04-05T10:04:14Z")

</div>

Hi, I’m plotting using `Plots` and noticed that by default 0,0 is at bottom left. Is there any way by which I can move this to top left (i.e. reverse y-axis).

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

Thanks

---

<div class="post-metadata">

**Author:** ![kapple](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kapple/32/218915_2.png) [@kapple](https://discourse.julialang.org/u/kapple)\
**Post date:** [November 1, 2021, 5:51am UTC](https://discourse.julialang.org/t/reversing-axis-of-the-plot/58604/2 "2021-11-01T05:51:06Z")

</div>

There’s many ways you can flip the y-axis. After running the plot function, you can run

```julia
yflip!(true)

```

or, if like me you like bundling all the options into the plot function, then, as an example:

```julia
using Plots
x = range(0, 10, length = 101)
f(x) = x * (x - 4) * (x - 9)
plot(x, f, yflip = true)

```

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

Alternatively,

```julia
using Plots
x = range(0, 10, length = 101)
f(x) = x * (x - 4) * (x - 9)
plot(x, f, yaxis = :flip)

```

which produces the same image above.

Check out the [documentation for plotting attributes](https://docs.juliaplots.org/latest/attributes/) for more info.
