How can I change quiver width (MaxHeadSize don't work for width)?
이전 댓글 표시
The code bellow
clearvars;
x = linspace(0,100,5);
y = x/100;
[x,y] = meshgrid(x,y);
u = x;
v = 0*x;
quiver(x,y,u,v);
generates the figure

I would like to reduce the arrow width and enlarge arrow length. This happens every time that the scale of x and y are different.
I already tried MaxHeadSize propriety, but it did not work as I would like.
Thank's in advance.
채택된 답변
추가 답변 (1개)
Cris LaPierre
2020년 1월 8일
편집: Cris LaPierre
2020년 1월 8일
maxHeadSize worked for me. Perhaps try setting it this way?
q=quiver(x,y,u,v);
q.MaxHeadSize = 0.01;
"quiver(...,scale) automatically scales the arrows to fit within the grid and then stretches them by the factor scale. scale = 2 doubles their relative length, and scale = 0.5 halves the length. Use scale = 0 to plot the velocity vectors without automatic scaling. You can also tune the length of arrows after they have been drawn by choosing the Plot Edit tool, selecting the quiver object, opening the Property Editor, and adjusting the Length slider."
카테고리
도움말 센터 및 File Exchange에서 Vector Fields에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
