- 积分
- 586
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2021-3-17
- 最后登录
- 1970-1-1
|
发表于 2021-6-10 10:38:50
|
显示全部楼层
我发不了链接,copy了code在这里:
Complete code after solution:
from windrose import WindroseAxes
from matplotlib import pyplot as plt
import matplotlib.cm as cm
import numpy as np
plt.figure()
ws = np.random.random(500) * 25
wd = np.random.random(500) * 360
ax = WindroseAxes.from_ax()
plt.style.use('fast')
ax.bar(wd, ws, nsector= 36,opening=0.94, bins=np.arange(0, 31, 5),edgecolor='gray',lw=0.1)
ax.set_xticklabels([90, 45, 0, 315, 270, 225, 180, 135])
ax.set_legend()
ax.set_title("Wind Rose")
plt.show() |
|