why i can't make title in figure?

21 ビュー (過去 30 日間)
Minsik Km
Minsik Km 2020 年 5 月 22 日
回答済み: Image Analyst 2020 年 5 月 22 日

回答 (2 件)

Mario Malic
Mario Malic 2020 年 5 月 22 日
編集済み: Mario Malic 2020 年 5 月 22 日
title(num2str(i))
  1 件のコメント
Minsik Km
Minsik Km 2020 年 5 月 22 日
thank you very much!

サインインしてコメントする。


Image Analyst
Image Analyst 2020 年 5 月 22 日
Not sure what you want so I've going to show you both alternatives. To set the titlebar caption of the figure, use its Name property. To set the title above an axes, use the title() function:
% Bring up a figure.
hFig = figure;
% Plot something.
plot(cosd(1:360), 'LineWidth', 3);
grid on;
xlabel('x', 'FontSize', 20);
ylabel('y', 'FontSize', 20);
% Maximize figure
hFig.WindowState = 'maximized';
% Give figure a name that depends on variables.
index = 42;
poster = 'Minsik';
figureName = sprintf('%s %d', poster, index); % Whatever you want...
hFig.Name = figureName; % Shows up in the titlebar of the whole window.
% Turn off the number in the figure name:
hFig.NumberTitle = 'off'
% Give the same name to the title over the axes:
title(figureName, 'FontSize', 20);

カテゴリ

Help Center および File ExchangeTitle についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by