File Exchange

image thumbnail

wind_rose(wind_dire​ction,wind_speed)

version 1.0.0.0 (829 Bytes) by Al Mac
Wind rose plot

42 Downloads

Updated 24 Nov 2017

View License

Very simple code to plot a wind rose. Pass it wind direct and wind speed and it will produce a simple wind rose. Note only designed for up to 25m/s but can easily be hacked to add more wind speed.

Cite As

Al Mac (2021). wind_rose(wind_direction,wind_speed) (https://www.mathworks.com/matlabcentral/fileexchange/65174-wind_rose-wind_direction-wind_speed), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (12)

Al Mac

Hi Maria, it is a very basic bit of script, I think it could be to do with your data being in a table. When I wrote it I passed it wind_direction (in degrees) and wind_speed (in m/s) as arrays. They are (n x 1) in size. n being the number of data points. if T is your table then maybe try wind_speed = table2array(T(:,1)); and wind_direction = table2array(T(:,2));, or however you table is formatted. Then run the function as wind_rose(wind_direction,wind_speed).

Maria Thaule

What is the best way to feed the data to the plot? I have used the "readtable" function from a .txt file with WindDirection and WindSpeed as two separate columns. However, it seems like there is a problem using the data... All i get is an empty plot.

I appreciate any help! :)

Shiyu Zhou

Michel Paurus

really simple and easy.

Paulo Eduardo Beiral

Chris Larson

How do I keep the legend and wind rose colors the same? Every time I change them, the other is slightly different.

Maria Hart

Dear Mac, could you give a hint how to implement your code in AppDesigner? Thank you very much!

Anthi Chatzopoulou

How can i keep same color in legend and graph fils?
It changes the color

Glaucia Fragoso

It seems that Face.Alpha changes the color

Katherine Harrison

Thank you for this!

Smirti Pokhrel

Gabriel Ruiz-Martinez

About Matlab Release Compatibility: this function is not compatible with previous versions to R2016a. Since this version, the function "polaraxes" was added to Matlab. : )

MATLAB Release Compatibility
Created with R2017b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!