How can I rotate a marker by a desired angle/azimuth on the map?
29 次查看(过去 30 天)
显示 更早的评论
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 个)
Prabhan Purwar
2019-8-2
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 个评论
Viven Sharma
2022-6-10
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?
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!