Hi Noah,
I understand that you want to plot multiple axes nested within the subplot. The `tiledlayout` function creates a grid of plots with consistent spacing, but when you add nested axes using the `axes` function, you must specify the position manually.
Here is an example code that creates a figure with 16 subplots, and within each subplot, it adds two nested sub-subplots. The positions of the nested axes are calculated relative to the parent subplot. Note that the factors used to adjust the position of the nested axes may need to be fine-tuned based on your figure's size and desired layout.
mainPos = get(tmpsub, 'Position');
ax2Pos = [mainPos(1) + mainPos(3) * 0.5, mainPos(2) + mainPos(4) * 0.5, mainPos(3) * 0.4, mainPos(4) * 0.4];
ax3Pos = [mainPos(1) + mainPos(3) * 0.5, mainPos(2), mainPos(3) * 0.4, mainPos(4) * 0.4];
ax2 = axes(cpDisplay, 'Position', ax2Pos);
ax3 = axes(cpDisplay, 'Position', ax3Pos);
set(ax2, 'XTick', [], 'YTick', [], 'Box', 'on');
set(ax3, 'XTick', [], 'YTick', [], 'Box', 'on');
t.TileSpacing = 'compact';
I hope this helps!