1

我想实现一个带有一些子图和顶部的主标题的图形,如下所示:

多行标题

我使用的代码:

figure
suptitle({'Multi-','line','Title'});
subplot(7,2,1:4);
    % there's intentionnal gap between 2 plots
    % therefore subplots 5 and 6 aren't used
plot(X);
subplot(7,2,7:14);
plot(Y);

问题是标题的第一行超出了图。

4

1 回答 1

4

文档suptitle明确指出:

在所有子图命令之后使用此功能。

所以你的解决方案是:

figure
subplot(7,2,1:4);
    % there's intentionnal gap between 2 plots
    % therefore subplots 5 and 6 aren't used
plot(X);
subplot(7,2,7:14);
plot(Y);
suptitle({'Multi-','line','Title'});
于 2013-08-20T13:38:28.963 回答