I want to create some left justified subplot title as in this picture:
I know how to get subplot titles:
subplot(2,2,1);
title('A No Depression')
But moving the title all the way to the corner then adding some descriptors of a different font size are confusing me a bit. Any help? Thanks!

 채택된 답변

Adam Danz
Adam Danz 2020년 8월 21일
편집: Adam Danz 2021년 1월 5일

4 개 추천

Prior to Matlab r2020b
  1. Set the title's units to Normalize
  2. Move the title leftward
  3. Set the title's HorizontalAlignment to Left.
figure()
axes()
ttl = title('Input firing rates');
ttl.Units = 'Normalize';
ttl.Position(1) = 0; % use negative values (ie, -0.1) to move further left
ttl.HorizontalAlignment = 'left';
Matlab r2020b or later
Set the TitleHorizontalAlignment propery of the axes. See more info in this Community Highlight.
figure()
ax = axes();
title('Input firing rates');
ax.TitleHorizontalAlignment = 'left';

댓글 수: 1

Adam Danz
Adam Danz 2021년 1월 5일
Answer updated on Jan 5, 2021 to include r2020b+ method.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

질문:

2020년 8월 21일

편집:

2021년 1월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by