下载解压工具包:
https://www.mathworks.com/matlabcentral/fileexchange/49542-phymhan-matlab-axis-label-alignment
添加至MATLAB路径:
在三维绘图后增加下列语句即可
ax = struct('Axes', gca);
align_axislabel([],ax)
h3d = rotate3d;
set(h3d,'ActionPreCallback','set(gcf,''windowbuttonmotionfcn'',@align_axislabel)');
set(h3d,'ActionPostCallback','set(gcf,''windowbuttonmotionfcn'','''')');
【个人感觉不好用,调整图窗大小后会乱】