# Using rose to plot polar histogram

**URL:** <https://forum.generic-mapping-tools.org/t/using-rose-to-plot-polar-histogram/2715>\
**Category:** PyGMT Q&A\
**Created:** [March 17, 2022, 11:13pm UTC](https://forum.generic-mapping-tools.org/t/using-rose-to-plot-polar-histogram/2715 "2022-03-17T23:13:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FinniganIK](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/finniganik/32/1587_2.png) [@FinniganIK](https://forum.generic-mapping-tools.org/u/FinniganIK)\
**Post date:** [March 17, 2022, 11:13pm UTC](https://forum.generic-mapping-tools.org/t/using-rose-to-plot-polar-histogram/2715/1 "2022-03-17T23:13:22Z")

</div>

Hi there,

I have a list of azimuths that I want to plot as a simple polar histogram, only considering azimuths (i.e. ignoring length). I can’t figure out the syntax to do this. I currently have something like this:

```auto
fig=pygmt.Figure()

fig.rose(
    data=azimuths, # this is just a list
    scale='u',
    sector='10',
    region=[0,1000,0,360],
    diameter='7.5c',
    frame=["x100g50", "y30g30", "+gwhite"],
    color='lightblue',
    pen='1p'
    )

fig.show()

```

---

<div class="post-metadata">

**Author:** ![weiji14](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/weiji14/32/33_2.png) [@weiji14](https://forum.generic-mapping-tools.org/u/weiji14)\
**Post date:** [March 18, 2022, 2:29pm UTC](https://forum.generic-mapping-tools.org/t/using-rose-to-plot-polar-histogram/2715/2 "2022-03-18T14:29:25Z")

</div>

Maybe you still need to provide a list of lengths with the same value? I don’t use `rose`, but after playing around with [Rose diagram — PyGMT](https://www.pygmt.org/v0.6.0/gallery/histograms/rose.html), I got this to work:

```python
import pygmt

fig = pygmt.Figure()

azimuths: list = [20, 40, 60]
lengths: list = len(azimuths) * [0.001] # all columns the same length

fig.rose(
    azimuth=azimuths,
    length=lengths,
    scale="u",
    sector=2,
    # specify the "region" of interest in the (r,azimuth) space
    # [r0, r1, az0, az1], here, r0 is 0 and r1 is 1000, for azimuth, az0 is 0
    # and az1 is 360 which means we plot a full circle between 0 and 360 degrees
    region=[0, 1, 0, 360],
    # set the diameter of the rose diagram to 7.5 cm
    diameter="7.5c",
    # use red3 as color fill for the sectors
    color="red3",
    # define the frame with ticks and gridlines every 0.2
    # length unit in radial direction and every 30 degrees
    # in azimuthal direction, set background color to white
    frame=["x0.2g0.2", "y30g30", "+gwhite"],
    # use a pen size of 1p to draw the outlines
    pen="1p",
)

fig.show()

```

produces:

 ![rose](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/3/3e97885952f21ff7cc7f6668194ccdd0cdb3d1fb.png)

---

<div class="post-metadata">

**Author:** ![FinniganIK](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/finniganik/32/1587_2.png) [@FinniganIK](https://forum.generic-mapping-tools.org/u/FinniganIK)\
**Post date:** [March 19, 2022, 10:42pm UTC](https://forum.generic-mapping-tools.org/t/using-rose-to-plot-polar-histogram/2715/3 "2022-03-19T22:42:22Z")

</div>

Thanks @weiji14! That works well
