Enclosing Multiple Subplots in a Box

23 ビュー (過去 30 日間)
Yugarshi Mondal
Yugarshi Mondal 2019 年 10 月 30 日
コメント済み: Fangjun Jiang 2019 年 10 月 30 日
I have a subplot that looks as follows:
+-+-+-+-+
|A|A|B|B|
+-+-+-+-+
|A|A|B|B|
+-+-+-+-+
|C|D|E|F|
+-+-+-+-+
I want to enclose plots A,C,D and B,E,F in boxes (to show these plots are "grouped" together).
How do I do this (using commands -- not using the plotting window)? thanks!

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2019 年 10 月 30 日
編集済み: Fangjun Jiang 2019 年 10 月 30 日
In the figure window, click "Insert", "Rectangle".
Or
% Create figure
figure1 = figure;
% Create subplot
subplot(4,4,1,'Parent',figure1);
% Create subplot
subplot(4,4,16,'Parent',figure1);
% Create rectangle
annotation(figure1,'rectangle',...
[0.0193673469387755 0.0571428571428572 0.489816326530612 0.930612244897968]);
  3 件のコメント
Yugarshi Mondal
Yugarshi Mondal 2019 年 10 月 30 日
編集済み: Yugarshi Mondal 2019 年 10 月 30 日
What are the parameters for 'rectangle' specifying?
Fangjun Jiang
Fangjun Jiang 2019 年 10 月 30 日
Position. See help annotation

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by