plot(1:100);
% make the axis smaller
pos = get(gca, 'Position');
set(gca,'Position',[pos(1), .2, pos(3) 0.7]);
% place custom text instead of xlabel
% note that the position is relative to your X/Y axis values
t = text(50, -5, {'X-axis' 'label'}, 'FontSize', 14);
set(t,'HorizontalAlignment','right','VerticalAlignment','top', ...
'Rotation',45);
1 回答
你不能自动完成 . 您必须将tic标签/ X标签替换为文本对象并自行旋转(see here to know how to do it) . 简单的解决方案如下:
还看看this FEX contribution .