How to flip Y axis title?

17 ビュー (過去 30 日間)
Calvin Moehlman
Calvin Moehlman 2022 年 2 月 15 日
コメント済み: Calvin Moehlman 2022 年 2 月 15 日
By default, you need to turn your head to the left to read a Y axis title. When creating a second y axis, the title is oriented in the same direction as the first axis. I would prefer to reverse the text of the second y axis so that you would need to tilt your head to the right to read.
Here's an example of how the plot titles currently look:
Here is How I would like the titles to be oriented:
Is this possible to do within Matlab?

採用された回答

KSSV
KSSV 2022 年 2 月 15 日
編集済み: KSSV 2022 年 2 月 15 日
figure
xlabel('xlabel')
yyaxis left
ylabel('First y-axis title')
yyaxis right
ylabel('Second y-axis title')
ylh = get(gca,'ylabel');
gyl = get(ylh);
ylp = get(ylh, 'Position');
ylp(1)=ylp(1)+0.02 ; % to adjust the position
set(ylh, 'Rotation',-90, 'Position',ylp, 'VerticalAlignment','middle', 'HorizontalAlignment','center')
  1 件のコメント
Calvin Moehlman
Calvin Moehlman 2022 年 2 月 15 日
Thanks! I had to adjust the position a little bit more, 0.3 worked for my graph.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by