Query about axes of graph created by plot function
显示 更早的评论
If I have two variables A = [1 2 3] and B = [1 2 3], when I plot(A,B) I get a graph with 10 variables on both x and y axis with constant intervals between 1 and 3.
Is there a way where I can just get a graph with 3 values 1, 2 and 3 on both x and y axis?
采纳的回答
更多回答(1 个)
Walter Roberson
2021-2-9
0 个投票
I suspect that you want to use xlim() and ylim()
2 个评论
Erika Yoshikawa
2021-2-9
Walter Roberson
2021-2-9
MATLAB automatically chooses "nice" ticks. You can use xticks() and yticks() to choose different tick locations.
类别
在 帮助中心 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
