关于坐标轴定制方面的方法请参考MATLAB作图技巧汇总。
本文主要记录在同一个图中做多个坐标轴的方法,代码如下
figure1 = figure;
axes1 = axes('Parent',figure1,'xAxisLocation','top','yAxisLocation','right');
hold(axes1,'all');
axes2 = axes('Parent',figure1,'xAxisLocation','bottom','yAxisLocation','left');
box(axes2,'on')
做出来的图如下: