How do i set the axis labels to a specific size?
3 次查看(过去 30 天)
显示 更早的评论
I would really like to set the axis in centimeters. The main problem is that my figure is off scale when i change the size of the window. i want to set the axis tickmarks so they have a specific length value and wont change length if the size of the window is changed.
0 个评论
回答(1 个)
Marc Jakobi
2016-10-5
Try playing around with the XTick and YTick properties in the axes.
You can save the XTick and YTick after creating the figure:
ax = gca;
xt = ax.XTick;
yt = ax.YTick;
after resizing the figure, you can set
ax.XTick = xt;
ax.YTick = yt;
to keep the ticks of the original figure.
2 个评论
Marc Jakobi
2016-10-5
编辑:Marc Jakobi
2016-10-5
XTick and YTick change the labels and the distance between ticks. You can set the length with the TickLength property.
另请参阅
类别
在 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!