Matlab: change position of ylabel
311 ビュー (過去 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.
0 件のコメント
回答 (2 件)
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 件のコメント
Walter Roberson
2022 年 10 月 8 日
Recent versions of MATLAB automatically rotate the angle for clarity.
David Hasin
2024 年 10 月 8 日
You can simply add this to the label line: ", 'Position', [-0.155,0.85,1]"
Here is an example:
ylabel('$\overline U_x/U_o$','FontSize',18,'Interpreter','Latex', 'Position', [-0.155,0.85,1]);
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Axis Labels についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!