I want to use the suptitle function (or something similar) to put a main title over a number of subplots; however, what I'd like to print has underscores in it.
For the regular title function, this works so that I can keep underscores instead of subscripting. However, this doesn't work with suptitle. Does anyone have any suggestions?
figure(1);
suptitle(trialName, 'Interpreter', 'none');

 채택된 답변

Adam Danz
Adam Danz 2019년 4월 1일
편집: Adam Danz 2019년 4월 2일

0 개 추천

Store the handle and change the interpreter to 'none'.
h = suptitle('my_super_title');
h.Interpreter = 'none';
See Steven Lord's solution for matlab releases after and including 2018b.

추가 답변 (1개)

Steven Lord
Steven Lord 2019년 4월 1일

0 개 추천

If you're using release R2018b or later, use the sgtitle function instead.
subplot(2, 2, 1);
subplot(2, 2, 2);
subplot(2, 2, 3);
sgtitle('x_1^2 + x_2^3', 'Interpreter', 'none')
Compare that with this title for the third subplot.
title('x_1^2+x_2^3')

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

질문:

2019년 4월 1일

편집:

2019년 4월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by