How can I rotate a marker by a desired angle/azimuth on the map?

29 vues (au cours des 30 derniers jours)
Michal Kruszewski
Michal Kruszewski le 30 Juil 2019
Commenté : Viven Sharma le 10 Juin 2022
Hello,
I am struggling to find a method of rotating a point on a map i.e. marker (currently i use a common 'o' marker with a defined color scale indicating an azimuth of the point/marker) by certain angle on the map?
Additionally, I would also like to change the type of marker from an 'o' type to an arrow (or a even line) indicating the direction. Can you help?
  1 commentaire
Michael Madelaire
Michael Madelaire le 30 Juil 2019
Take a look at Quiver. I think that is what you are looking for.

Connectez-vous pour commenter.

Réponses (1)

Prabhan Purwar
Prabhan Purwar le 2 Août 2019
quiver() works fine in placing markers on the plotted graph. Following example illustrates drawing marker at various angles and positions.
x=5;
y=5;
r=1;
theta=0;
for theta=0:90:360
x=x+3;
u = cos(theta).*r;
v = sin(theta).*r;
hold on
quiver(x,y,u,v);
end
axis([1,24,1,10]);
For more information refer to the following link:
  1 commentaire
Viven Sharma
Viven Sharma le 10 Juin 2022
Hi,
How can we rotate a marker, like let's say '+' for example. Quiver function rotates the line which is under the property 'LineStyle' and not 'Marker'.
Also, I don't see any such property under the plot and scatter functions as well.
Can anyone provide more information in this regard?

Connectez-vous pour commenter.

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by