compass plot
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
muhammad tariq
el 21 de Ag. de 2011
Respondida: Abby Skofield
el 7 de Oct. de 2024
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 comentarios
Respuesta aceptada
Abby Skofield
el 7 de Oct. de 2024
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 comentarios
Más respuestas (1)
Paulo Silva
el 21 de Ag. de 2011
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])
Ver también
Categorías
Más información sobre Polar Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!