Matlab: change position of ylabel

270 次查看(过去 30 天)
I was wondering if it is possible to change the position of the ylabel. I would like to move it down (as suggested on the attached figure) to match it better with the yticks.

回答(1 个)

Ameer Hamza
Ameer Hamza 2020-5-15
编辑:Ameer Hamza 2020-5-15
If you have the handle of ylabel, then you can modify its position using the 'position' property. For example
label_h = ylabel('myLabel');
label_h.Position(1) = 2040; % change horizontal position of ylabel
label_h.Position(2) = 0; % change vertical position of ylabel
Experiment with these values until you get the required location.
  2 个评论
Utkarsh
Utkarsh 2022-10-8
what about roation of ylabel?
Walter Roberson
Walter Roberson 2022-10-8
You can use ytickangle
Recent versions of MATLAB automatically rotate the angle for clarity.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Axis Labels 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by