下面我基于此使用 Windrose 绘制了风玫瑰图。首先,图例覆盖了玫瑰的一部分,但是当我尝试使用loc
它来设置它的位置时,图例消失了。
其次,传说中的右括号是错误的,即[0.0 : 1.0[
知道我如何解决这个问题[0.0 : 1.0]
代码:
from windrose import WindroseAxes
import matplotlib.cm as cm
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
df = pd.read_csv("C:\2007_GG_wind rose.csv")
ws_SAR = df[' SARwind_10m']
wd_SAR = df['wind direction SAR model_int']
ws_mde = df['gg_mde']
wd_mde = df['wind direction MDE ']
ax=WindroseAxes.from_ax()
ax.bar(wd_SAR,ws_SAR,normed=True, opening=0.8, edgecolor='white')
ax.set_legend()
plt.title("SAR 10m U",y=1.08) #y=1.08 raises the title