You are reading an old version of the documentation (v3.1.1). For the latest version see
Version 3.1.2
Fork me on GitHub

Table of Contents

Related Topics

Bar chart on polar axis

Demo of bar plot on a polar axis.

import numpy as np
import matplotlib.pyplot as plt

# Fixing random state for reproducibility

# Compute pie slices
N = 20
theta = np.linspace(0.0, 2 * np.pi, N, endpoint=False)
radii = 10 * np.random.rand(N)
width = np.pi / 4 * np.random.rand(N)
colors = / 10.)

ax = plt.subplot(111, projection='polar'), radii, width=width, bottom=0.0, color=colors, alpha=0.5)


The use of the following functions, methods, classes and modules is shown in this example:

import matplotlib


<module 'matplotlib.projections.polar' from '/tmp/mpldocs/lib/python3.6/site-packages/matplotlib/projections/'>

Keywords: matplotlib code example, codex, python plot, pyplot Gallery generated by Sphinx-Gallery