How to flip Y axis title?
조회 수: 9 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
채택된 답변
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')
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!