In order to have multiple plots with compact spacing and preset height, you can have separate axes objects in the same figure and set their positions as required. Please take a look at the example below which illustrates this. Here, instead of having a tiled chart layout or subplot, two separate axes objects are created and their positions are specified explicitly.
f = figure();
ax1 = axes(f);
ax2 = axes(f);
ax1.Units = 'centimeters';
ax2.Units = 'centimeters';
axHeight = 3;
ax1.Position(4) = axHeight;
ax2.Position(4) = axHeight;
plot(ax2,1:10,1:10);
plot(ax1,1:20,1:20);
spacing = 0.3;
ax2.Position(2) = ax1.Position(2) + ax1.Position(4) + ax1.TightInset(4) + ax2.TightInset(2) + spacing ;
Best Answer