How do I change axis label orientation

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?

 Respuesta aceptada

Chunru
Chunru el 24 de Jun. de 2022
[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;

Más respuestas (0)

Categorías

Productos

Versión

R2022a

Etiquetas

Preguntada:

el 23 de Jun. de 2022

Respondida:

el 24 de Jun. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by