Closed vimalaathythan-v2w closed 4 months ago
You need to set nsector=36
as shown in this example in the documentation: https://python-windrose.github.io/windrose/usage-output.html#...or-without-filled-regions using nsector=16
.
It is also listed under "Optional:" a bit further down in the docs.
This should do what you want:
from windrose import WindroseAxes
import numpy as np
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', nsector=36)
ax.set_legend()
I don't think it's easy to read though - 16 is the sweetspot imo.
Hi ,
Thanks for the quick and helpful response. Setting nsector=36 works perfectly! I'll keep your readability tip about 16 in mind.
Much appreciated!
Thanks & Regards, Vimalaathythan M.
From: Jonas Kittner @.> Sent: Tuesday, June 25, 2024 4:18 AM To: python-windrose/windrose @.> Cc: Vimalaathythan Manivasakam @.>; Author @.> Subject: Re: [python-windrose/windrose] custom binning of wind direction direction (Issue #273)
You need to set nsector=36 as shown in this example in the documentation: https://python-windrose.github.io/windrose/usage-output.html#...or-without-filled-regions using nsector=16.
It is also listed under "Optional:" a bit further down in the docs.
This should do what you want:
from windrose import WindroseAxes import numpy as np
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', nsector=36) ax.set_legend()
I don't think it's easy to read though - 16 is the sweetspot imo.
grafik.png (view on web)https://github.com/python-windrose/windrose/assets/54631600/04bb77c9-8caa-452e-ad91-b8596d2a9aec
— Reply to this email directly, view it on GitHubhttps://github.com/python-windrose/windrose/issues/273#issuecomment-2187549470, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BIQGR7HMXN3AXB2OZP53RDDZJCO2TAVCNFSM6AAAAABJZRLIESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBXGU2DSNBXGA. You are receiving this because you authored the thread.Message ID: @.***>
@.*** would like to recall the message, "Re: [python-windrose/windrose] custom binning of wind direction direction (Issue #273)".
Use case: need to bin the wind direction the binning interval is 10 degree. so for 360 degree we will have 36 bars . how to set the no of bars in the wind rose?