How to plot quiver with same scale on x and y axis?
15 ビュー (過去 30 日間)
古いコメントを表示
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.
採用された回答
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
subplot(1,2,1)
quiver(x,y,u,v)
% and with axis equal
subplot(1,2,2)
quiver(x,y,u,v)
axis equal
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Vector Fields についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!