How to improve the title appearance?

조회 수: 3 (최근 30일)
Maria445
Maria445 2018년 9월 18일
댓글: Maria445 2018년 9월 18일
Hi, I'd like to improve a bit the general aspect of my graphs, but I don't know much about it. For example, in the following graph:
I don't want to change the size of the picture, but I'd like that the "x 10^6" not to overlap with the title of the graph. A solution that I found was to write the title in the area immediately below the top margin, using
title(['Performance = ' num2str( round(improve,2) ) ' \%'],'interpreter',...
'latex', 'Units', 'normalized', 'Position', [0.5, 0.85, 0])
However, it sometimes overlap with the graph.
Also, I'd like the title to be boxed in a rectangular gray area. Is this possible?
  댓글 수: 3
Jan
Jan 2018년 9월 18일
What do you want to happen instead? Where should the information about the 10^6 appear? Currently the diagram does not contain units, such that it looks inappropriate for a scientific publication. So why not dividing the data by 10^6 and defining the units in the Y-label?
Maria445
Maria445 2018년 9월 18일
@Walter, I have Matlab 2017a.
@Jan, you're right, it would be better. I'll think about a way to automate your suggestion, as I'm running a loop, and each time it runs it produces different graphs, with a different order of magnitude on the Y-axis

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

채택된 답변

Jan
Jan 2018년 9월 18일
편집: Jan 2018년 9월 18일
text(0.5, 0.99, ['Performance = ' num2str( round(improve,2) ) ' \%'], ...
'Units', 'normalized', ...
'interpreter', 'latex', ...
'VerticalAlignment', 'top', ...
'BackgroundColor', [0.5,0.5,0.5]);
Instead of estimating the vertical position as 0.85, it is smarter to align the text vertically with "top".
  댓글 수: 1
Maria445
Maria445 2018년 9월 18일
Thank you so much, that is exactly what I wanted!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Title에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by