How to shift the y-axis and force it to start at another number rather than 0?
조회 수: 27 (최근 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!