How to get rid of blank space in a heatmap panel of 3 figures?
1 回表示 (過去 30 日間)
古いコメントを表示
Hello everyone, I need to create a single figure that contains 3 imagesc plots one next to each other horizontally. I have done it with the command subplot but I had to divide the plotting area by two to get squared heatmaps ( a picture related to subplot(1,3,1) with rectangular heatmaps is attached). However this implies that I have a lot of blank space in my plot (see attached figure "blank space"). How can I get rid of it? I would like to have something like this at the end
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/656830/image.png)
Thanks for help
subplot(2,3,1)
all_mean_mat1 = [all_mean(:,4) all_mean(:,8) all_mean(:,12) all_mean(:,13) all_mean(:,14)];
imagesc(all_mean_mat1);
subplot(2,3,2)
all_mean_mat2 = [all_mean(:,4) all_mean(:,8) all_mean(:,12) all_mean(:,13) all_mean(:,14)];
imagesc(all_mean_mat2);
subplot(2,3,3)
all_mean_mat3 = [all_mean(:,4) all_mean(:,8) all_mean(:,12) all_mean(:,13) all_mean(:,14)];
imagesc(all_mean_mat3);
all_mean_mat_tot = [all_mean_mat1 all_mean_mat2 all_mean_mat3];
0 件のコメント
回答 (1 件)
Joseph Cheng
2021 年 6 月 17 日
have you looked at the functions
axis equal
or
axis square
those might be applicable to you and not have to only use top half of a 2row x 3 column subplot
2 件のコメント
Joseph Cheng
2021 年 6 月 17 日
can you explain why this blank space is bad and can't be fixed with some cropping if you're pasting the figure into another document? Are you asking to resize the figure window to fit nicely around the plotted items?
参考
カテゴリ
Help Center および File Exchange で Data Distribution Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!