# How do I flip the r-axis in polar plot?

**URL:** https://discourse.julialang.org/t/how-do-i-flip-the-r-axis-in-polar-plot/106022
**Category:** Visualization
**Tags:** plots
**Created:** [November 10, 2023, 1:07am UTC](https://discourse.julialang.org/t/how-do-i-flip-the-r-axis-in-polar-plot/106022 "2023-11-10T01:07:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![minetest2048](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/minetest2048/32/45961_2.png) [@minetest2048](https://discourse.julialang.org/u/minetest2048)
#### Post date: [November 10, 2023, 1:07am UTC](https://discourse.julialang.org/t/how-do-i-flip-the-r-axis-in-polar-plot/106022/1 "2023-11-10T01:07:05Z")

</div>

I want to plot satellite track over a ground station, like how Gpredict and other ground station tool does it:

 ![28902144392_d267e4f296_o](https://global.discourse-cdn.com/julialang/original/3X/8/e/8e2b345ecd07bd44e1d3d2b8ef97d4285e681945.png)

In that polar plot, for the r-axis, 90 degrees is at the center and 0 degrees is at the edge. In Julia its the other way, 0 is at the center and 90 is at the edge:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/1/6/16f960dcba0bf9dde474258f50390c1e384c13dc.png)

I want the plot to look like this, with 0 at the edge and 90 at the center:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/9/0/90501ab09e19b36573a08aa42a38419633f6ddc2.png)

I got that by subtracting the r-axis values from 90 degrees, something like this:

```julia
plot(azimuth[4149:4149+400], 90 .- elevation[4149:4149+400],proj = :polar, ylim=(0,90))

```

---

<div class="post-metadata">

### Author: ![mike.ingold](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mike.ingold/32/203749_2.png) [@mike.ingold](https://discourse.julialang.org/u/mike.ingold)
#### Post date: [November 10, 2023, 2:23am UTC](https://discourse.julialang.org/t/how-do-i-flip-the-r-axis-in-polar-plot/106022/2 "2023-11-10T02:23:24Z")

</div>

It looks like this might be possible using **Makie.jl** insteads of **Plots.jl** : see the example [on this page](https://docs.makie.org/stable/reference/blocks/polaraxis/) titled “Reoriented Axis”.

---

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [November 10, 2023, 11:44pm UTC](https://discourse.julialang.org/t/how-do-i-flip-the-r-axis-in-polar-plot/106022/3 "2023-11-10T23:44:10Z")

</div>

In `Plots.jl`, after the above-mentioned data flip transformation, we can deactivate the labeling of the radial axis and then manually annotate it:

```julia
using Plots; gr()

θ = range(0, 2π, 100)
rθ = 50 .+ 30*cos.(3*θ .- π/6).^3
plot(θ, 90 .- rθ, proj=:polar, c=:blue, yaxis=false, ylims=(0,90))
annotate!(zeros(3), 0:1/3:2/3, text.(string.(90:-30:30), 8, "Computer Modern"))

```

![Plots_polar_flip_radial_axis](https://global.discourse-cdn.com/julialang/original/3X/4/8/485fe96537d7f47d361c2e0462ee2b090cef5453.png)
