📄 ticklabelx.m
字号:
function ticklabelx(labx,strx)if nargin == 1 strx='';endXt=get(gca, 'Xtick');Yt=get(gca, 'Ytick');Xl=get(gca, 'XLim');Yl=get(gca, 'Ylim');% Place the new Xtick labelstx = text(Xt,Yl(1)*ones(1,length(Xt)),labx);set(tx,'HorizontalAlignment','center','VerticalAlignment','top') % Remove the default XTicklabelsset(gca,'XTickLabel','')%Find the extent of the XtickLabelsfor i = 1:length(tx) extx(i,:) = get(tx(i),'Extent');end posx=get(get(gca, 'xlabel'), 'position');xlabel(strx, 'Position', [posx(1) min(min(extx)) posx(3)])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -