How can I adjust the arrowhead proportions when creating a Quiver plot whose X- and Y- data ranges differ substantially?
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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)])
Akzeptierte Antwort
MathWorks Support Team
am 17 Aug. 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)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Vector Fields finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!