0
点赞
收藏
分享

微信扫一扫

python之windrose风向玫瑰图的用法


1.安装

A package is available and can be downloaded from PyPi and installed using:

$ pip install windrose

Install latest development version

$ pip install git+https://github.com/python-windrose/windrose

or

$ git clone https://github.com/python-windrose/windrose
$ python setup.py install

2.使用例子

需要在notebook中使用

from windrose import WindroseAxes
from matplotlib import pyplot as plt
import matplotlib.cm as cm
import numpy as np

# Create wind speed and direction variables

ws = np.random.random(500) * 6
wd = np.random.random(500) * 360


ax = WindroseAxes.from_ax()
ax.bar(wd, ws, normed=True, opening=0.8, edgecolor='white')
ax.set_legend()

plt.show()

python之windrose风向玫瑰图的用法_git

3:文档和api

 

​​https://github.com/python-windrose/windrose​​

​​https://pypi.org/project/windrose/#description​​

 

 

 

举报

相关推荐

0 条评论