subplot 配置 余白 変更
22 views (last 30 days)
Show older comments
k=1:1:22
subplot(4,6,k)
subplotを用いて1つの図に22個のグラフを一行あたり4,5,4,5,4個ずつ表示したい。︎
この図のように余白を極力排除して配置するにはどのようにしたらよいでしょう。
現在は以上のコードで表示しています。
1 Comment
Accepted Answer
Kenta
on 26 Jan 2019
clear;clc;close all
onion = imread('onion.png');
onionArray = repmat(onion, [ 1 1 1 22]);
montage(onionArray,'size',[6 4]);
こちらに同様の質問と回答がありました。参考になるかもしれません。
ちなみに、一行あたり4,5,4,5,4個ずつ表示したい、とのことですが、
4または5個ごとにデータの中身に区切りがあるのでしょうか。もしないのであれば、
montageで表示させると余白がなく、きれいに表示できると思います(添付の画像)。
22枚の写真を、例えば、imagedatastoreなどを使ってまとめるとうまく表示できると思います。
もし、何かあればご返信いただけると幸いです。
0 Comments
More Answers (0)
See Also
Categories
Find more on Subplots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!