aligning the axes labels in 3d plot in matlab

ぃ、小莉子 提交于 2019-12-23 12:25:50

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!