Two-line y-label with Latex interpreter not centred properly
조회 수: 13 (최근 30일)
이전 댓글 표시
Hi,
I'd like to make a 2-line y-label in Latex but centred properly. When I try
%
figure
plot(0:10,0:10)
ylabel({'line 1 of label','line 2 (Suppose I want just \emph{THIS} italicized)'},'interpreter','latex')
%
I get the top plot in the attached screenprint, where the centering is wrong.
I also tried
%
figure
plot(0:10,0:10)
ylabel({'line 1 of label','line 2 (Suppose I want just THIS italicized)'})
%
and it centres properly, but then I can't selectively italicize the symbol I want - it's all or nothing.
I'm sorry if this is a really dumb question - I would've thought there'd already be an answer, but I can't for the life of me find one.
Thanks for your help!
댓글 수: 0
채택된 답변
Star Strider
2017년 12월 3일
This works for me (in R2017b):
figure
plot(0:10,0:10)
ylabel({'line 1 of label','line 2 (Suppose I want just \it{THIS} italicized)'}, 'interpreter','latex')
댓글 수: 2
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Bar Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!