作业帮 > 综合 > 作业

MATLAB绘制二维图时如何使坐标轴名字显示在右侧?

来源:学生作业帮 编辑:灵鹊做题网作业帮 分类:综合作业 时间:2024/05/13 11:56:57
MATLAB绘制二维图时如何使坐标轴名字显示在右侧?
默认的好象在中间,如果在画完图后一个一个改太麻烦了.
有没有什么语句能实现的?比如xlabel,我不知道说明中的Property的值都有什么.
MATLAB的帮助里这样写的:
Repositioning Axis Labels
1.You can reposition an axis label using Start plot editing mode by selecting Edit Plot from the figure Tools menu.
2.Select the text of the label you want to reposition (handles appear around the text object).
3.With the left mouse button down on the selected label,drag the text to the desired location and release.
只有这种方法吗?T_T
1楼:1、要求线性分度;2、那还不如我窗口拖动简单呢;3、没太明白,好象也是窗口操作的,非语句直接能实现.
MATLAB绘制二维图时如何使坐标轴名字显示在右侧?
plot(magic(5))
xlim = get(gca,'XLim');
ylim = get(gca,'YLim');
h = xlabel('xx');
set(h,'Position',[xlim(2)+(xlim(2)-xlim(1))*0.05,ylim(1)])