问题
I plot the mesh data with the following matlab commands
[x, y] = meshgrid(-10:0.1:10, -10:0.1:10);
z = exp(-x.^2 - y.^2);
mesh(x, y, z);
xlabel('time variable');
ylabel('space variable');
zlabel('wave');
You will see that no matter how to rotate the axes, the x and y label are always aligned horizontally. Is there any way to make it align with the x axis and y axis separately while I rotating the axes?
回答1:
There has been a submission to align axes labels with the figure axis here.
回答2:
You can set the rotation
property of each label:
set(get(gca,'xlabel'),'rotation',angle); %where angle is in degrees
来源:https://stackoverflow.com/questions/14669503/aligning-the-axes-labels-in-3d-plot-in-matlab