Compass Plot OR Polar Plot for Wind Vane Visualization

8 次查看(过去 30 天)
I am trying to create a visualization for a Wind Vane indicator. I found a polar plot plot example and on the polar plot example, axis properties were used to change the degrees around the circle to "N", "NW", etc...
I am using this code to make a Polar Plot indicate the direction the wind is out of:
% Convert to radians
rad = windDir*pi/180;
% Add 90 counter clockwise rotation to align the compass with true North
rad = rad+pi;
theta = rad;
rho = windSpeed;
Z = polarplot(theta,rho,'-');
Z.LineWidth = 12;
pax = gca;
angles = 0:45:360;
pax.ThetaTick = angles;
labels = {'E','NE','N','NW','W','SW','S','SE'};
pax.ThetaTickLabel = labels;
pax.Title.String = 'Wind Dir. Out Of...';
pax.Title.Color = 'red';
I like that the compass plot uses a long arrow and can show historical arrows. The compass plot could be used to indicate wind is blowing "toward" but when I try to use the same axis properties in the compass plot, matlab does not recognize the parameters. It only recognizes the axis parameters of a cartesian coord plot.
Thanks.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Polar Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by