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

11 visualizaciones (últimos 30 días)
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)])

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 17 de Ag. de 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)

Más respuestas (0)

Categorías

Más información sobre Vector Fields en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Productos


Versión

R2009a

Community Treasure Hunt

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

Start Hunting!

Translated by