How to shift the y-axis and force it to start at another number rather than 0?
22 次查看(过去 30 天)
显示 更早的评论
Dear all,
I have this:
But I need to see what is the plot if the horizontal axes cross value is -3 like this (with same as above data):
How I can do this?
Thank you
采纳的回答
Ameer Hamza
2020-11-16
You can change the yticklabels() to show the values you want. For example
rng(0);
lower_value = -3;
x = randn(1, 10);
y = x - lower_value;
bh = bar(y);
yticklabels(string(yticks+lower_value))
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!