Can I change the line width of the arrows in quiverm?

7 ビュー (過去 30 日間)
Brendan Hall
Brendan Hall 2023 年 5 月 17 日
コメント済み: Brendan Hall 2023 年 6 月 9 日
Hello,
I'm trying to change the line width of the arrows in the map based, axesm specifically, function quiverm. The usual quiver funciton has a linewidth LINESPEC while I'm not sure if quiverm does.
Thanks,

採用された回答

Varun
Varun 2023 年 5 月 19 日
Hello!
While there is no direct Name-Value argument to set "LineWidth" of the arrows of a "quiverm" plot, here's a workaround to modify the same:
load("wind","x","y","u","v")
lat = y(11:22,11:22,1);
lon = x(11:22,11:22,1);
dlat = v(11:22,11:22,1);
dlon = u(11:22,11:22,1);
figure
[latlim,lonlim] = geoquadline(lat,lon);
usamap(latlim,lonlim)
myquiverm=quiverm(lat,lon,dlat,dlon)
myquiverm =
2×1 Line array: Line (Quivers) Line (Quivers)
myquiverm(1).LineWidth=2 %for the lines
myquiverm =
2×1 Line array: Line (Quivers) Line (Quivers)
myquiverm(2).LineWidth=3 %for the arrowheads
myquiverm =
2×1 Line array: Line (Quivers) Line (Quivers)
You can store the output of the quiverm function to a variable. The variable is observed to be an array of two 'Line' objects. The first object controls the lines of the arrows, while the second one controls the arrowheads. So, modifying the LineWidth properties of these objects will alter the plot as needed. The data here has been taken from the example present in the "quiverm" documentation: https://www.mathworks.com/help/map/ref/quiverm.html#mw_bb73427a-2dad-496f-a3b7-573c1f36c527 .
Hope this helps!
  1 件のコメント
Brendan Hall
Brendan Hall 2023 年 6 月 9 日
Thanks So much that's perfect!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by