{"id":28464,"library":"windrose","title":"Windrose","description":"Windrose is a Python library using Matplotlib and Numpy to manage wind data and draw windrose (polar rose) plots. It provides tools for wind direction and speed frequency visualization, with a simple interface for binned speed roses. Current version 1.10.0 requires Python >=3.10. Release cadence is intermittent, with occasional patches.","status":"active","version":"1.10.0","language":"python","source_language":"en","source_url":"https://github.com/python-windrose/windrose","tags":["windrose","wind data","polar plot","matplotlib","visualization"],"install":[{"cmd":"pip install windrose","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core plotting backend","package":"matplotlib","optional":false},{"reason":"Numerical operations on wind data","package":"numpy","optional":false}],"imports":[{"note":"Internal module path changed; direct package-level import is correct for v1.10.0","wrong":"from windrose.windrose import WindroseAxes","symbol":"WindroseAxes","correct":"from windrose import WindroseAxes"},{"note":"Function renamed in v1.6+; wr_plot was deprecated","wrong":"from windrose import wr_plot","symbol":"plot_windrose","correct":"from windrose import plot_windrose"},{"note":"Class for wind data processing and plotting","symbol":"Windrose","correct":"from windrose import Windrose"}],"quickstart":{"code":"import numpy as np\nimport matplotlib.pyplot as plt\nfrom windrose import WindroseAxes\n\n# Generate synthetic wind data\nws = np.random.weibull(2, 100) * 10  # wind speed\nwd = np.random.uniform(0, 360, 100)  # wind direction\n\n# Create windrose plot\nax = WindroseAxes.from_ax()\nax.bar(wd, ws, normed=True, opening=0.8, edgecolor='white')\nax.set_legend()\nplt.show()","lang":"python","description":"Basic windrose bar plot with random wind data. Use 'from_ax()' to attach the axes to a figure."},"warnings":[{"fix":"Use 'from windrose import WindroseAxes' instead of 'from windrose.windrose import WindroseAxes'.","message":"Importing from submodule 'windrose.windrose' is deprecated; directly import from 'windrose'.","severity":"deprecated","affected_versions":"<1.10.0"},{"fix":"Replace 'wr_plot' calls with 'plot_windrose'.","message":"In version 1.6, the function 'wr_plot' was renamed to 'plot_windrose' and the old name removed.","severity":"breaking","affected_versions":">=1.6"},{"fix":"Avoid automatic layout adjustment or apply after plotting with constrained layout.","message":"WindroseAxes.bar() modifies the axes limits internally; calling plt.tight_layout() may distort the plot.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use 'from windrose import WindroseAxes' (not 'from windrose.windrose import WindroseAxes')","cause":"Importing from the wrong submodule after version 1.6. The package no longer exposes classes through the deprecated submodule path.","error":"AttributeError: module 'windrose' has no attribute 'WindroseAxes'"},{"fix":"Use 'from windrose import plot_windrose' instead.","cause":"Function was renamed in windrose 1.6. 'wr_plot' no longer exists.","error":"AttributeError: module 'windrose' has no attribute 'wr_plot'"},{"fix":"Ensure you call ax.bar(direction, speed, ...) with direction (degrees) first, then speed.","cause":"Passing wind direction and speed as positional arguments in wrong order or omitting direction.","error":"TypeError: bar() missing 1 required positional argument: 'direction'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}