필터 지우기
필터 지우기

How do I change axis label orientation

조회 수: 30 (최근 30일)
Charles Campbell
Charles Campbell 2022년 6월 23일
답변: Chunru 2022년 6월 24일
When axis labels are added to a figure created with surf.m, the z axis label text aligns parallel to the z axis but the x and y label text do not align parallel with their axes. Is there any way to make they do so?

채택된 답변

Chunru
Chunru 2022년 6월 24일
[X, Y] = meshgrid(1:.2:10, 1:.2:20);
Z = sin(X) + cos(Y);
figure
surf(X, Y, Z)
xlabel('XLabel');
ylabel('YLabel');
zlabel('ZLabel');
figure
surf(X, Y, Z)
xlabel('XLabel');
ylabel('YLabel');
zlabel('ZLabel');
h =gca;
h.XAxis.Label.Rotation = 15;
h.YAxis.Label.Rotation = -30;

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by