fig = plt.figure()
ax = plt.subplot(111, polar=True)
r_bins = np.linspace(0.0, 1.0, 12)
N_theta = 36
d_theta = 2.0 * np.pi / (N_theta + 1.0)
theta_bins = np.linspace(-d_theta / 2.0, 2.0 * np.pi + d_theta / 2.0, N_theta)
H, theta_edges, r_edges = np.histogram2d(theta % (2.0 * np.pi), r, bins=(
    theta_bins, r_bins))
r_mid = 0.5 * (r_edges[:-1] + r_edges[1:])
theta_mid = 0.5 * (theta_edges[:-1] + theta_edges[1:])
cax = ax.contourf(theta_mid, r_mid, H.T, 10, cmap=plt.cm.Spectral)
ax.scatter(theta, r, color='k', marker='+')
ax.set_rmax(1)
plt.show()
График плотности контура в matplotlib с использованием полярных координат