How to make the negative sign of y axis to be up ?
24 次查看(过去 30 天)
显示 更早的评论
How to make the negative sign of y axis to be up?
0 个评论
回答(2 个)
VBBV
2024-7-15
ydata = -900:100:100
xdata = ydata.*ones(1,length(ydata))
plot(xdata,ydata)
yticks = ydata;
yticklabels(fliplr(yticks))
1 个评论
dpb
2024-7-15
ydata = -900:100:100;
xdata = ydata;
plot(xdata,ydata)
hAx=gca;
hAx.YDir='reverse';
The above reverses the actual relation between the x, y values; as defined, y==x so the negative x and y values should be associated visually.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!