How can I adjust the arrowhead proportions when creating a Quiver plot whose X- and Y- data ranges differ substantially?

13 visualizzazioni (ultimi 30 giorni)
I am attempting to create a Quiver plot using the data below, but the arrowheads have substantial overlap, resulting in a confusing plot.
x = 15:24;
y = 0.5:0.01:0.59;
u = ones(10);
v = 0.01*ones(10);
quiver(x,y,u,v)
xlim([min(x) max(x)])
ylim([min(y) max(y)])

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 17 Ago 2009
This issue is due to the way the arrowheads are scaled in relation to the range of the axes.
As a workaround, the Quiver plot can be created on a set of axes with equal ranges. Then the axes can be re-labeled appropriately. For example,
x = 15:24;
y = 0.5:0.01:0.59;
u = ones(10);
v = 0.01*ones(10);
scale_factor = range(x)/range(y);
figure;
ah = axes;
quiver(x,y*scale_factor,u,v*scale_factor)
xlim([min(x) max(x)])
ylim([min(y) max(y)]*scale_factor)
set(ah,'YTick',y*scale_factor)
% properly re-label to y-axis
set(ah,'YTickLabel',y)

Più risposte (0)

Categorie

Scopri di più su Vector Fields in Help Center e File Exchange

Tag

Non è stata ancora inserito alcun tag.

Prodotti


Release

R2009a

Community Treasure Hunt

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

Start Hunting!

Translated by