Last active
July 22, 2022 17:09
-
-
Save schluppeck/ea4d8cad02383ba6d7fdde5cf30f26d6 to your computer and use it in GitHub Desktop.
tiled layout with new matlab functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% example of tiled plots with shared axes and labels | |
% | |
% ds 2022-07-22 | |
figure() | |
nRows = 4; | |
nCols = 4; | |
t = tiledlayout(nRows,nCols,'TileSpacing','Compact'); | |
for iRow = 1:nRows | |
for iCol = 1:nCols | |
nexttile | |
plot(rand(1,20)) | |
% for debugging (tile specific title) | |
% title(sprintf('r,c [%d, %d]', iRow, iCol)) | |
end | |
end | |
%% share title, axes, etc. | |
title(t,'Shared title: pRF plots') | |
xlabel(t,'Time (TRs)') | |
ylabel(t,'fMRI reponse (% signal change') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment