How i can flip the y-axis?
조회 수: 1,600 (최근 30일)
이전 댓글 표시
Hello,
In the following code:
a = [180 170 150 90 45 5 0 -5 -30 -70 -100 -125 -150 -175];
b = [1 2 3 4 5 6 7 8 9 10 11 12 13 14];
plot (a, b,'.')
How i can plot the b variable (as the y-axis) with the high numbers down and the low numbers up in the plot?
Thanks
댓글 수: 0
채택된 답변
추가 답변 (2개)
Stalin Samuel
2017년 1월 31일
편집: Stalin Samuel
2017년 1월 31일
If you planning to change the ylabel use
set(gca,'YtickLabel',14:-2:0)
Or else, if you wants to flip b alone you can use
fliplr(b)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!