compass plot
7 次查看(过去 30 天)
显示 更早的评论
Hi,
How do I make Compass Plot to display the zero degrees (North) up, instead of 90 (zero to the right)?
% script file plotharmonic
% introduzir M2 S2 K1 O1 K2
amp = [1.0448,0.365,0.0712,0.0622,0.1027];
pha = [77.16,105.75,61.67,320.84,101.95];
rdir = pha * pi/180;
[x,y] = pol2cart(rdir,amp);
compass(x,y)
0 个评论
采纳的回答
Abby Skofield
2024-10-7
Starting in R2024b, the compassplot function can be used in place of compass to create arrows eminating from the origin of a polar axes. The PolarAxes class has many properties and several functions you can use to customize its appearance, like the location of theta==0. Note that compassplot can be combined in a PolarAxes with other plots like polarhistogram, polarplot, polarscatter, etc.
t = linspace(0,3*pi/2,10);
pax = polaraxes;
cp = compassplot(t,10:-1:1); % new in R2024b
pax.ThetaZeroLocation = "top";
0 个评论
更多回答(1 个)
Paulo Silva
2011-8-21
amp = [1.0448,0.365,0.0712,0.0622,0.1027];
pha = [77.16,105.75,61.67,320.84,101.95];
rdir = pha * pi/180;
[x,y] = pol2cart(rdir,amp);
compass(x,y)
view([-90 90])
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Polar Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!