Reverse y axis order
显示 更早的评论
Hi. I have the following script (attached )b and the run that it opens can be found at this link.
https://drive.google.com/open?id=0B0wQbicZOF7xN1BXV1FKVVRCT2c
It works perfectly except I want to reverse the the y- axis. I have tried several things but no luck. The only way I found is to do it manually. Is there another way?
采纳的回答
更多回答(1 个)
KSSV
2017-3-28
N = 10 ;
x = rand(N,1) ;
y = 1:N ;
figure(1)
plot(x,y) ;
figure(2)
plot(x,y) ;
set(gca,'Ydir','reverse')
5 个评论
David du Preez
2017-3-28
Timothy Buchanan
2019-8-7
It worked for me.
Helene Thygesen
2020-11-10
it worked for me too
Ruslan Askarov
2023-5-26
it worked for me too. Thanks a lot!
Jahanzeb Saqib
2023-6-8
Its working for me as well even with barh plot... Many thanks!
类别
在 帮助中心 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!