I want to have 2 plots in a figure stacked vertically with preset height (both 3cm) and compact spacing between them. I am using a tiled chart layout since it has the option for compact spacing, but when I try to set the height using the "Position" argument, I get the following warning.
Warning: Unable to set 'Position', 'InnerPosition', 'OuterPosition', or 'ActivePositionProperty' for objects in a TiledChartLayout
On maximizing/minimizing the generated figure window, it is observed that the height of the axes is not set to the constant value as required. My code is given below:
tiledlayout(2,1);nexttile;plot(1:10);ax=gca;ax.Units='centimeters';ax.Position(4)=3;nexttile;plot(1:20);ax=gca;ax.Units='centimeters';ax.Position(4)=3;
Best Answer