Compass Plot OR Polar Plot for Wind Vane Visualization

조회 수: 22 (최근 30일)
Luke Barker
Luke Barker 2020년 1월 8일
편집: Luke Barker 2020년 1월 8일
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