Trying to plot a windrose diagram with speed and direction being plotted and the concentration determining the color. Unfortunately, matplotlib only supports two variables.
The plots shown can be created using a pcolormesh
.
import matplotlib.pyplot as plt
import numpy as np
theta = np.linspace(0,2*np.pi)
r = np.linspace(2,15,16)
Theta, R = np.meshgrid(theta, r)
C = np.sinc(Theta-2)+(5-np.sqrt(R))+np.random.rand(len(r),len(theta))
C = np.ma.masked_less_equal(C,2)
fig, ax = plt.subplots(subplot_kw={"projection":"polar"})
ax.pcolormesh(Theta, R, C, vmin=2, vmax=5)
plt.show()