How do i set the axis labels to a specific size?
조회 수: 2 (최근 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!