How do I shift the axes labeling in matlab?
6 次查看(过去 30 天)
显示 更早的评论
By axis labeling, I mean the values (1,2,3,...10) written below the x-axis. I want to shift it down.Using the following code, I am able to shift the axis name down.
xlabh = get(gca,'xlabel');
set(xlabh,'Position',get(xlabh,'Position') - [0 0.005 0]);
0 个评论
回答(2 个)
Image Analyst
2017-6-20
Do you perhaps mean
ax = gca; % Get handle to current axes.
ax.XAxisLocation = 'origin'; % Put ticks and labels next to x axis instead of outside the box.
0 个评论
Jan
2017-6-20
You cannot control the position of the tick labels. Does changing the tick length help? https://www.mathworks.com/help/matlab/ref/numericruler-properties.html#property_d0e696160
Perhaps you can change the tick format to '\n%g'?
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Axis Labels 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!