How to make a Nightingale rose chart
Using ONLY matplotlib
I like matplotlib — and I like making plots using only matplotlib. This is because, I hate having to read through pages and pages of documentation from some obscure dataviz library that I will only use once for a chart.
However, I was unable to find a guide that made a rose chart using only matplotlib. It turns out, it’s really simple; it’s just a few bar charts on top of each other on a polar axis.
We start with a simple bar chart using the code above, and we end up with the chart below. Note that when we make our data, we add the previous bars. This is because we will be plotting several bar charts on top of each other.
Now we change two lines in the code. Firstly, line 10 to x_max = 2*np.pi
and line 15 to ax = fig.add_subplot(111, polar=True)
. This gives us the following chart.