Skip to content

Commit

Permalink
Merge pull request #21 from MET-OM/tmp
Browse files Browse the repository at this point in the history
Update var_rose
  • Loading branch information
dung-manh-nguyen authored Apr 4, 2024
2 parents 8502c49 + 3ba6a22 commit d2b54ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions metocean_stats/stats/dir_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ def rose(wd,ws,max_ws,step_ws,min_percent, max_percent, step_percent):

def var_rose(data, direction,intensity, output_file, method='overall'):

direction = data[direction]
intensity = data[intensity]
direction2 = data[direction]
intensity2 = data[intensity]
size = 5
if method == 'overall':
fig = plt.figure(figsize = (8,8))
ax = fig.add_subplot(111, projection="windrose")
ax.bar(direction, intensity, normed=True, opening=0.8, nsector=12)
ax.bar(direction2, intensity2, normed=True, opening=0.8, nsector=12)
ax.set_legend()
ax.figure.set_size_inches(size, size)
plt.savefig(output_file,dpi=100,facecolor='white',bbox_inches='tight')
Expand Down

0 comments on commit d2b54ee

Please sign in to comment.