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

4 visualizzazioni (ultimi 30 giorni)
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];

Risposte (1)

Joseph Cheng
Joseph Cheng il 17 Giu 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 Commenti
Camilla Ancona
Camilla Ancona il 17 Giu 2021
Modificato: Camilla Ancona il 17 Giu 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 il 17 Giu 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?

Accedi per commentare.

Categorie

Scopri di più su Data Distribution Plots in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by