0
votes

The MATLAB surf plot below is essentially two plots plotted adjacent to each other. For clarity, I have included some code below used to prepare the plot:

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

I would like for the y axis numbering to restart at the start of the second graph. How do I go about doing that?

MATLAB surf plot with a jump

1
Have a look at plotyy.m and see how to do it. Try to make multiple axes with the same Position property. - bla
What do you mean restart? Do you want to limit it to some range? Then ylim should work, if not, please clarify. - BioSP

1 Answers

1
votes

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".