How to set the axis limits for compass plot. I want to set axis from 0 to 360 degree in clockwise direction.

1 comentario

Walter Roberson
Walter Roberson el 9 de Mayo de 2012
http://www.mathworks.com/matlabcentral/answers/29922-why-your-question-is-not-urgent-or-an-emergency

Iniciar sesión para comentar.

 Respuesta aceptada

Geoff
Geoff el 9 de Mayo de 2012

0 votos

Why is this urgent?
Try this:
set(gca,'xdir','reverse')
Or if you want the zero on the right as normal, do this instead:
set(gca,'ydir','reverse')

4 comentarios

Thulasi Durai Durai Samy
Thulasi Durai Durai Samy el 9 de Mayo de 2012
Thanks for your reply. The above command works. but zero degree comes on the horizontal axis but I want in vertical axis. moreover what are other such handles that gca can return wher I can find it
Walter Roberson
Walter Roberson el 9 de Mayo de 2012
doc axes_props
If you want to move the 0 to a different position, then you will need to create an hgtransform and parent the compass plot to it. Or rewrite the compass plot routine. Or consider using polar(). Or you might be able to get somewhere using the "view"
There is no simple axes setting in MATLAB to switch X and Y axes in a plot.
Thulasi Durai Durai Samy
Thulasi Durai Durai Samy el 10 de Mayo de 2012
I tried using hgtransform, I could able to alter the xlable, ylable, Xtick, Ytick and many related property. But the compass routine displays the degrees in lable which I could not to find out the type of handles. Certainly it is not in the MATLAB documentation. pls help
Thulasi Durai Durai Samy
Thulasi Durai Durai Samy el 11 de Mayo de 2012
I could able to alter the routine for polar(). The text dispalyed in the compass plot can be altered by modifying the text() command with in the polar() routine. Later by using the set(gca, 'ydir', 'reverse') and view(270,90) it is possible to vary the elevation and azimutal by which zero degree plots in the vertical axis.

Iniciar sesión para comentar.

Más respuestas (1)

Abby Skofield
Abby Skofield el 4 de Oct. de 2024

2 votos

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 direction. 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.ThetaDir = "clockwise";
pax.ThetaZeroLocation = "top";

Categorías

Más información sobre Polar Plots en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 9 de Mayo de 2012

Respondida:

el 4 de Oct. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by