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일

0 개 추천

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개)

카테고리

도움말 센터File Exchange에서 Vector Fields에 대해 자세히 알아보기

태그

질문:

djr
2020년 4월 30일

댓글:

2020년 4월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by