You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Version 2.1.1.post1120+g407a460
Fork me on GitHub

Related Topics

This Page

Polar DemoΒΆ

Demo of a line plot on a polar axis.

import numpy as np
import matplotlib.pyplot as plt

r = np.arange(0, 2, 0.01)
theta = 2 * np.pi * r

ax = plt.subplot(111, projection='polar')
ax.plot(theta, r)
ax.set_rticks([0.5, 1, 1.5, 2])  # Less radial ticks
ax.set_rlabel_position(-22.5)  # Move radial labels away from plotted line

ax.set_title("A line plot on a polar axis", va='bottom')

Gallery generated by Sphinx-Gallery