To achieve this effect, you must use multiple axes because MATLAB does not provide separate TickLength properties for the X and Y axes.
Example:
x=linspace(0,4*pi); y=sin(x); ax=plotyy(x,y,0,0); set(ax(1),'XTick',[]); set(ax(1),'YColor',get(ax(1),'XColor')) set(ax(2),'TickLength',[0 0]); set(ax(2),'YTick',[]);
This is a bit hacky, but it works using the additional y axis provided by the plotyy() function to save x-axis labels with a length of 0 ticks, while showing y-ticks from the original y-axis.
Teddy ort
source share