How do I reverse the y-axis in image?
조회 수: 256 (최근 30일)
이전 댓글 표시
채택된 답변
Orion
2014년 11월 25일
편집: MathWorks Support Team
2018년 11월 27일
You can change the direction of increasing values along the y-axis by setting the YDir property of the Axes object.
If you want the values to increase from bottom to top (2-D view), then set the value to 'normal'. Alternatively, if you want the values to decrease from bottom to top, then set the value to 'reverse'. For example:
ax = gca;
ax.YDir = 'normal'
댓글 수: 2
추가 답변 (4개)
Shane
2014년 11월 25일
Alternatively, you can flip the array. Either fliplr or flipud Flip Left-Right, or Up-Down, depending on how your data is.
plot(X, fliplr(Y))
댓글 수: 0
Jamel
2022년 6월 7일
How do I reverse the "Interference from Satellite Constellation Communication Link" code, where the direction starts from the opposite way.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Object Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!