How to plot quiver with same scale on x and y axis?

10 ビュー (過去 30 日間)
Ahmet Altunsu
Ahmet Altunsu 2022 年 11 月 29 日
コメント済み: Ahmet Altunsu 2022 年 12 月 21 日
Hey, im trying to plot a qiver plot for current speed. In the plot, x-axis is date and y-axis is the velocity. When i plotted the quivers, because of the difference with x and y-axis numbers, the arrows direction came out wrong. I think, its because, while x-axis date values are 7.376115416666666e+05 to 7.376195416666666e+05, and y-axis velocity values are -0.31 to 0.41.
When i create a number vector with y-values by using linspace command and plot the arrows, directions are came out okey. But is that the correct way to do it?
So, how can i set a same scale for both axis? or should i plot the arrows with mentioned above?
Thank you.
  1 件のコメント
Ahmet Altunsu
Ahmet Altunsu 2022 年 11 月 29 日
Note: I forgot the the wrong direction plot. here the image:



Voss 2022 年 11 月 29 日
Have you tried axis equal?
% random quiver plot
d = datenum(now());
x = d:1e-6:d+1e-4;
y = randn(1,101);
u = randn(1,101);
v = randn(1,101);
% compare without axis equal
% and with axis equal
axis equal
  1 件のコメント
Ahmet Altunsu
Ahmet Altunsu 2022 年 12 月 21 日
Thats worked. Thank you.


その他の回答 (0 件)


Find more on Vector Fields in Help Center and File Exchange


Community Treasure Hunt

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

Start Hunting!

Translated by