shifting x-axis
8 次查看(过去 30 天)
显示 更早的评论
Hi,
I want to shift the x-axis from the bottom to the top of a figure using the command line. I know how to do it by using the plot tools. I would like to know how to do it via the command line. Thanks
0 个评论
采纳的回答
the cyclist
2012-1-17
plot(1:10)
set(gca,'XAxisLocation','top')
3 个评论
the cyclist
2012-1-17
Probably the easiest way to plot two axes is with the plotyy() function. For example:
figure
[ax,h1,h2] = plotyy(1:10,1:10,1:10,2:11);
set(ax(1),'XAxisLocation','top')
set(ax(2),'XAxisLocation','bottom')
If you don't have two set of data to plot, you use "NaN" in place of the second pair of x-y data.
[If you have more detailed questions, you might want to start another thread, so it doesn't get lost in the comments. I think people tend to ignore questions that have accepted answers.]
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Two y-axis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!