0

下面的 MATLAB 冲浪图本质上是两个相邻的图。为了清楚起见,我在下面包含了一些用于准备绘图的代码:

band1 = horzcat(band1, eSurface2(:,:,1)); 
band2 = horzcat(band2, eSurface2(:,:,2));
surf(band2,'DisplayName','band2');
surf(band3,'DisplayName','band2');

我希望 y 轴编号在第二张图的开头重新开始。我该怎么做呢?

带有跳跃的 MATLAB 冲浪图

4

1 回答 1

1

You can use the 'YTick' and 'YTickLabel' properties of the axis to control the ticks, this way you can make it start from zero for the second graph. It will require some trail and error to get it right. See the relevant doc here (you'll have to scroll all the way to the bottom of the page).

Take advantage of the following feature of 'YTickLabel': "If you do not specify enough text labels for all the tick marks, MATLAB uses all of the labels specified, then reuses the specified labels".

于 2013-04-30T05:25:29.217 回答