# Set "0 degree" location in Polar plot?

**URL:** https://discourse.julialang.org/t/set-0-degree-location-in-polar-plot/96947
**Category:** General Usage
**Created:** [April 1, 2023, 1:35pm UTC](https://discourse.julialang.org/t/set-0-degree-location-in-polar-plot/96947 "2023-04-01T13:35:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Ahmed\_Salih](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ahmed_salih/32/206579_2.png) [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)
#### Post date: [April 1, 2023, 1:35pm UTC](https://discourse.julialang.org/t/set-0-degree-location-in-polar-plot/96947/1 "2023-04-01T13:35:16Z")

</div>

Hello!

In Matlab one can very easily do:

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

Which basically rotates your plot, so that in this case the Theta Zero Location is at the top. How would I do the same thing in Julia?

Kind regards

---

<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: [April 1, 2023, 1:56pm UTC](https://discourse.julialang.org/t/set-0-degree-location-in-polar-plot/96947/2 "2023-04-01T13:56:48Z")

</div>

Linking related threads [here](https://discourse.julialang.org/t/polar-plot-with-0-at-the-nadir/92119) and [there](https://discourse.julialang.org/t/radar-plot-in-plots-jl-or-makie-jl/88576).

---

<div class="post-metadata">

### Author: ![Ahmed\_Salih](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ahmed_salih/32/206579_2.png) [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)
#### Post date: [April 3, 2023, 5:54pm UTC](https://discourse.julialang.org/t/set-0-degree-location-in-polar-plot/96947/3 "2023-04-03T17:54:16Z")

</div>

Thank you for this. A better solution exists now, see:

> <https://github.com/sciapp/gr/issues/168#issuecomment-1493231162>
>
> \*\*Enhancement request\*\*
> 
> I recently tried using GR via Plots.jl to produce a p…olar plot of luminaire photometry. I was quite surprised to discover that there no way to change the polar coordinates used by GR. No matter what I did, 𝜃 = 0° was always at the right of the chart and type C photometry is usually presented with 𝜃 = 0° at the bottom. 
> 
> So this is a request for the ability to rotate the axis of the polar graph.
> 
> Dan, over on the Julia Discourse board, \[provided\](https://discourse.julialang.org/t/polar-plot-with-0-at-the-nadir/92119/4?u=rmfritz) a Julia function which made it work, and so I have graphs to present, showing what is currently supported and what I actually wanted.
> 
> What I could get from unmodified GR:
> !\[image\](https://user-images.githubusercontent.com/276178/209601648-8bf08add-14eb-468a-8635-82e51886cad7.png)
> 
> 
> What I wanted:
> !\[image\](https://user-images.githubusercontent.com/276178/209601436-4fc361cf-1487-4d93-b79e-52c8cd0d6dd3.png)

```julia
using GR
angles = LinRange(0, 2pi, 40)
radii = LinRange(0, 2, 40)
polar(angles, radii, theta_zero_location="S", theta_direction=-1)

```

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