Clear Filters
Clear Filters

How to get rid of blank space in a heatmap panel of 3 figures?

10 views (last 30 days)
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
all_mean_mat1 = [all_mean(:,4) all_mean(:,8) all_mean(:,12) all_mean(:,13) all_mean(:,14)];
all_mean_mat2 = [all_mean(:,4) all_mean(:,8) all_mean(:,12) all_mean(:,13) all_mean(:,14)];
all_mean_mat3 = [all_mean(:,4) all_mean(:,8) all_mean(:,12) all_mean(:,13) all_mean(:,14)];
all_mean_mat_tot = [all_mean_mat1 all_mean_mat2 all_mean_mat3];

Answers (1)

Joseph Cheng
Joseph Cheng on 17 Jun 2021
have you looked at the functions
axis equal
axis square
those might be applicable to you and not have to only use top half of a 2row x 3 column subplot
Camilla Ancona
Camilla Ancona on 17 Jun 2021
Edited: Camilla Ancona on 17 Jun 2021
If I use axis square command, it only center the 3-figure panel but i still have the issue with the blank space surrounding the pictures.
Joseph Cheng
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?

Sign in to comment.


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!