我使用windrose轴绘制了一个windrose,但无法找到如何将轴设置为显示方向(N、NNE、NE、NEE…),而不是度
我正在使用Jupyter笔记本,到目前为止还没有找到任何有用的提示。 这是我的密码:
from windrose import WindroseAxes
from matplotlib import pyplot as plt
import matplotlib.cm as cm
import numpy as np
from numpy import genfromtxt
data=np.genfromtxt("data.csv",delimiter=";")
#removing NaN-s and pulling the data from the array
ws=data[1::,2]
wd=data[1::,3]
wd1=np.nan_to_num(wd)
ws1=np.nan_to_num(ws)
ax = WindroseAxes.from_ax()
ax.bar(wd1, ws1, normed=True, opening=1, edgecolor='White', bins=[0,0.5,1.5,3.3,5.5,7.9])
ax.legend()
这是我得到的数字。在文档中,他们使用相同的代码,但轴不同
我也有同样的问题。我用以下方法代替
ax = WindroseAxes.from_ax()
解决了这个问题:相关问题 更多 >
编程相关推荐