フィルターのクリア

Quiver uniform arrows spacing

9 ビュー (過去 30 日間)
djr
djr 2020 年 4 月 30 日
コメント済み: Ameer Hamza 2020 年 4 月 30 日
Hello,
I have the following data (attached) that want to use in quiver plot as follows:
quint = 20;
quiver(xplot(1:quint:end),yplot(1:quint:end),uplot(1:quint:end),vplot(1:quint:end),1, 'Color','k','LineWidth',1)
My grid has a resolution of 50 m but when I reduce the number of arrows with quint to plot every 20th arrow, I get very dense arrows in the diagonal direction on the grid (attached figure).
I would like to have uniform distribution of arrows in the x and y directions.
Can you help me out wth this please?
Thanks.
djr

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 4 月 30 日
You can decrease the density of arrows by downsampling, both along rows and columns
xplot = streamplot{1};
yplot = streamplot{2}.';
uplot = streamplot{3};
vplot = streamplot{4}.';
quint = 20;
quiver(xplot(1:quint:end,1:quint:end), yplot(1:quint:end,1:quint:end), ...
uplot(1:quint:end,1:quint:end), vplot(1:quint:end,1:quint:end))
  2 件のコメント
djr
djr 2020 年 4 月 30 日
Ohhh, I just needed to do it in both directions. Thanks a lot!
Ameer Hamza
Ameer Hamza 2020 年 4 月 30 日
Glad to be of help.

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

その他の回答 (0 件)

カテゴリ

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