title: Circular / polar histogram in python
body: <p>I have periodic data and the distribution for it is best visualised around a circle. Now the question is how can I do this visualisation using <code>matplotlib</code>? If not, can it be done easily in Python?</p>
  <p>Here I generate some sample data which I would like to visualise with a circular histogram:</p>
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  
  # Generating random data
  a = np.random.uniform(low=0, high=2*np.pi, size=50)
  </code></pre>
  <p>There are a few examples in a question on SX for <a href="https://mathematica.stackexchange.com/questions/31347/circular-plot-and-circular-histogram">Mathematica</a>.</p>
  <p>I would like to generate a plot which looks something like one of the following:
  <img src="https://i.stack.imgur.com/dBCNK.png" alt="enter image description here" /><img src="https://i.stack.imgur.com/MpSSh.png" alt="enter image description here" /></p>