%% This function plots all voxel-wise time courses of GM, WM and CSF voxels % in the same graph % % Inputs: % - h is the handle to the figure % - function [h] = JOVE_PlotMotion(h,Mot,TR) n_TP = size(Mot,1); hold(h,'on'); CM = cbrewer('qual','Set1',9); for i = 1:size(Mot,2) plot(h,((1:n_TP)-1)*TR,Mot(:,i),'color',CM(i,:),'LineWidth',2); end tmp = Mot(:); range = [-max(abs(tmp)),max(abs(tmp))]; axis(h,[0,(n_TP-1)*TR,range(1),range(2)]); end