subplot 配置 余白 変更
17 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
k=1:1:22
subplot(4,6,k)
subplotを用いて1つの図に22個のグラフを一行あたり4,5,4,5,4個ずつ表示したい。︎
この図のように余白を極力排除して配置するにはどのようにしたらよいでしょう。
現在は以上のコードで表示しています。
1 commentaire
Réponse acceptée
Kenta
le 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Subplots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!