Quiver scale variables differently?

13 views (last 30 days)
JEC PsiCom
JEC PsiCom on 23 May 2011
Commented: Francois Clemens on 21 Apr 2019
Hello. I have this problem.
I have two different types of flux/velocity variables (in u and v) that I want to compare using a quiver plot. The problem is that one of the variables is scaled a LOT bigger than the other variable, no matter the actual physical values it has. For examplem, if I force it smaller by multiplying by 0.001 or something, it STILL shows these huge arrows. That is, variable 2 has longer quiver arrows than variable 1 even though the values it has is smaller.
ps; I've tried to set 'autoscaling','off', but it doesn't help.
What's going on? :/
  1 Comment
Oleg Komarov
Oleg Komarov on 23 May 2011
Post code and input examples: http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer
and format the code: http://www.mathworks.com/matlabcentral/answers/7885-tutorial-how-to-format-your-question

Sign in to comment.

Answers (3)

Sean de Wolski
Sean de Wolski on 23 May 2011

Two ideas:

  • Use the scale input to quiver
doc quiver
  • Normalize the arrows to be the exact same range:
u2 = u2./(max(u2(:))).*max(u1(:));

Tim Whiteley
Tim Whiteley on 13 Nov 2017
Hello. I am having the same problem as JEC PsiCom. Here is an example of some toy code where x and y are different scales. When plotted, the y scale of the arrowheads is hugely disproportional (the vertical lines being the arrowheads). Any help would be much appreciated.
Francois Clemens
Francois Clemens on 21 Apr 2019
Forget it, I mixed up the order of the variables, the issue raised by JEX Psicom remains....

Sign in to comment.

abuzer on 2 Apr 2013
you should cahnge the scale parameter.
scale=1; axis equal; hold on plot(x,y,'o'); h=quiver(x, y, v, u, scale);

Community Treasure Hunt

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

Start Hunting!

Translated by