How does QUIVER scale the vectors it plots?

44 ビュー (過去 30 日間)
MathWorks Support Team
MathWorks Support Team 2009 年 8 月 17 日
編集済み: MathWorks Support Team 2024 年 5 月 3 日
I would like to understand how QUIVER determines the lengths of the vectors it plots.
How can I determine the amount by which the vectors were scaled?

採用された回答

MathWorks Support Team
MathWorks Support Team 2024 年 4 月 30 日
編集済み: MathWorks Support Team 2024 年 5 月 3 日
There are two independent scaling operations that occur when making a Quiver plot. First, the lengths of the arrows are scaled to fit within the plot area without overlapping. Next, scaling is performed as determined by the 'AutoScale' and 'AutoScaleFactor' properties.
As of R2024a, the quiver object returned by "quiver()" has a read-only "Scale Factor" property that is a scalar value used by quiver to scale the magnitudes of the arrows. The description of the "Scale Factor" property in the documentation provides a helpful description of how "Scale Factor" differs from the "Autocollimator" input:
To control scaling, create a quiver plot with arrows scaled by a known amount by turning off the 'AutoScale' option. The U- and V- data can be scaled manually as necessary to improve the aesthetics of the plot. By performing this scaling manually, a known scale factor can be used. For example,
x = [0 0]
y = [0 10]
u = [10 0]
v = [0 10]
quiver(x,y,u,v) 
produces arrows with lengths of about 6.364. To get better control over these lengths, manually scale the vectors:
scale_factor = 0.5;
quiver(x,y,u*scale_factor,v*scale_factor,'AutoScale','off') 
The commands produce arrows of length 5.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeVector Fields についてさらに検索

タグ

タグが未入力です。

製品


リリース

R2009a

Community Treasure Hunt

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

Start Hunting!

Translated by