How can I bring the xticklabels closer to the x-axis/xticks?

2 次查看(过去 30 天)
How can I bring the xticklabels closer to the x-axis/xticks?
plot(1:10,1:10)
set(gca,'Fontsize',20,'FontWeight','normal',...
'LineWidth',1,'TickDir','out','box','off',...
'TickLength',[0.05 0.05]);

采纳的回答

Sim
Sim 2024-6-25
编辑:Sim 2024-6-27
Sorry, siilly question... I got it:
plot(1:10,1:10)
set(gca,'Fontsize',20,'FontWeight','normal',...
'LineWidth',1,'TickDir','out','box','off',...
'TickLength',[0.05 0.05]);
a=gca;
a.XRuler.TickLabelGapOffset = -8;

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Grid Lines, Tick Values, and Labels 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by