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

43 ビュー (過去 30 日間)
Michal Kruszewski
Michal Kruszewski 2019 年 7 月 30 日
コメント済み: Viven Sharma 2022 年 6 月 10 日
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 件のコメント
Michael Madelaire
Michael Madelaire 2019 年 7 月 30 日
Take a look at Quiver. I think that is what you are looking for.

サインインしてコメントする。

回答 (1 件)

Prabhan Purwar
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
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 ExchangeVector Fields についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by