필터 지우기
필터 지우기

How to change width of quiver plot instead of length=

조회 수: 8 (최근 30일)
Julia
Julia 2019년 2월 24일
답변: Star Strider 2019년 2월 24일
Hello,
The normal quiver plot with matlab will modify the arrow length according to the data.
Is it possible to have the same arrow size for all data points, and have the line width of the arrow changed depending on the data?
So small vectors are thinner and large vectors are more "bold".
Thank you for your help!

답변 (1개)

Star Strider
Star Strider 2019년 2월 24일
You can turn off the scaling (from the documentation):
  • 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
However, if you want different line widths for different values, you would have to program that yourself. See the documentation on Quiver Properties (link) for details.

카테고리

Help CenterFile Exchange에서 Vector Fields에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by