Polar Coordinates with plotnine
1 Introduction
This online book provides a gallery of plots using either coord_polar() or coord_radial() with a custom version of plotnine, a Python library implementing the grammar of graphics (Wilkinson 2005) using an API based on that of the R packageggplot2.
Caution
All of the examples on this page require the coord-polar branch of iangow/plotnine. The standard version of plotnine does not include the coord_polar() and coord_radial() functions used here.
I have chosen examples from a number of sources that serve both as targets for development of coord_polar() and coord_radial() and as illustrations of how those functions can be used.
- In Chapter 2, I use examples from the ggplot2 documentation for
coord_polar(). - In Chapter 3, I use examples from the ggplot2 documentation for
coord_radial(). - In Chapter 4, I use an example from Chapter 8 of Healy (2026).
- In Chapter 5, I Dominic Royé’s climate circles.
- In Chapter 6, I replicate Florence Nightingale’s famous plot.
The source code for this page can be found at https://github.com/iangow/coord-polar-test.
Healy, Kieran. 2026. Data Visualization: A Practical Introduction. 2nd ed. Princeton University Press. https://socviz.co/.
Wilkinson, Leland. 2005. The Grammar of Graphics. 2nd ed. Statistics and Computing. Springer.