How do I reverse the y-axis in image?
263 次查看(过去 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!