How can I rotate a marker by a desired angle/azimuth on the map?
조회 수: 31 (최근 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?
참고 항목
카테고리
Help Center 및 File Exchange에서 Vector Fields에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!