Donut chart with python matplotlib

Krishna
1 min readSep 11, 2015

--

Recently I had to sketch a donut chart for one of my projects using python matplotlib. When I looked into the example provided in matplotlib site for donut chart, the code was not very clear and obvious to me. So I was thinking of other ways to sketch a donut chart. Then I realized, donut is a pie with a big hole at the center, so why not draw a pie chart and impose white circle on top of it to make it look like a donut. Voila!!

Donut chart using Python Matplotlib

Python code to sketch a donut

This is the python code from Github. I used the example pie chart code from matplotlib site and drew a white circle at the center of the pie.

--

--

Krishna

love to build awesome products, pursue design thinking, do full-stack, architect cloud-native SaaS products, an aspiring product manager