How to get rid of blank space in a heatmap panel of 3 figures?
5 views (last 30 days)
Show older comments
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
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 Comments
Answers (1)
Joseph Cheng
on 17 Jun 2021
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 Comments
Joseph Cheng
on 17 Jun 2021
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?
See Also
Categories
Find more on Data Distribution Plots 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!