HI @远帅
The axes box and ticks are controlled with properties like Box, XAxisLocation, YAxisLocation, and the Tick properties. By default, the ticks appear on the axes at the bottom (x) and left (y), but when you turn the box on (with box on), the axis lines also appear at the top and right—with ticks on all sides.
To achieve axis lines on all four sides but ticks only on the left and bottom, you can use a trick: overlay two axes objects. The bottom one will have box on, but no ticks; the top one will have ticks only on the left and bottom, but no box.
Here's an example:
x = 0:0.1:10;
y = sin(x);
% First axes: box and all lines, but no ticks
ax1 = axes('Position',[0.13 0.11 0.775 0.815]);
plot(x, y, 'b');
set(ax1, 'Box', 'on', ...
'XTick', [], ...
'YTick', [], ...
'Color', 'none');
% Second axes: only left and bottom ticks, no box, on top
ax2 = axes('Position', get(ax1,'Position'), ...
'Color', 'none', ...
'XAxisLocation', 'bottom', ...
'YAxisLocation', 'left', ...
'Box', 'off');
hold(ax2, 'on');
plot(ax2, x, y, 'b');
set(ax2, 'Box', 'off');
% Link axes so zooming/panning works together
linkaxes([ax1 ax2]);
% Send the first axes to the back
uistack(ax1, 'bottom');
Hope this helps!