function plot_1d_clusterstats(rois,labels)

    %% plot group 1-D results for ventral visual stream areas
    %rois = {'BA17_18_19','BA36_37_20'}; %{'BA17_18','BA19','BA37','BA36','BA20'};
    %cmap = cbrewer('seq','YlGnBu',length(rois)+1); cmap(cmap>1) = 1; cmap(cmap<0) = 0;
    %cmap = flipud(cbrewer('div','Spectral',11)); cmap = cmap(1:length(rois),:); cmap(cmap>1) = 1; cmap(cmap<0) = 0;
    
    %set colormap according to input
    if isequal({'BA17_18_19','BA37','BA20','BA39_40'},rois) 
        %custom colormap to match EES colorscheme from poster
        occ = [161,218,180]  / 255; 
        postit = [65,182,196] / 255;
        antit = [34,94,168] / 255;
        lpc = [198, 140, 195] / 255;
        cmap4 = [occ;postit;antit;lpc];
        cmap = cmap4;
    else
        cmap = cbrewer('seq','YlGnBu',length(rois)+1); cmap(cmap>1) = 1; cmap(cmap<0) = 0;
    end

    for phase = 1:2
        if phase == 1
            phaseTag = 'enc';
            tit = 'Encoding';
        elseif phase == 2
            phaseTag = 'rec';
            tit = 'Recognition';
        end

        n_areas = length(rois);
        v_bar_y = linspace(-2,-2-0.2*n_areas,n_areas);

        figure;

        for roix = 1:length(rois)
            sig_pos_timepoints = 0; sig_neg_timepoints = 0;
            load(['..\STATS\Btw_within\300width_50step_1500ms\1D\memory\' rois{roix} '_' phaseTag '_stats.mat'])

            %plot t-values
            x = 1:size(groupstats.emp.t,2); %time bins
            y = groupstats.emp.t;
            hi = plot(x,y,'Color',cmap(roix,:),'LineWidth',4); hold on;
            
            %plot sem
            sem = [];
            for win = 1:size(groupstats.sub.emp,2)
                sub_stat = groupstats.sub.emp(:,win);
                sub_sem = std(sub_stat) / (sqrt(length(sub_stat)));
                sem(win) = sub_sem;
            end
            
            %plot shaded area
            x = 1:numel(y); %y is empirical t-value across subjects
            curve1 = y + sem; %sem is standard error across subjects at each timepoint
            curve2 = y - sem;
            x2 = [x, fliplr(x)];
            inBetween = [curve1, fliplr(curve2)];
            he = fill(x2, inBetween, cmap(roix,:),'FaceAlpha',0.4,'EdgeColor',[0.8 0.8 0.8]);
            hold on;
            %he = plot(x, y, 'r', 'LineWidth', 2);
            
            %plot horizontal line indicating sig timepoints
            if groupstats.emp_cluster.pos.idx ~= 0 
                sig_pos_timepoints = find(groupstats.emp_cluster.pos.map == groupstats.emp_cluster.pos.idx);
            end
            if groupstats.emp_cluster.neg.idx ~= 0 
                sig_neg_timepoints = find(groupstats.emp_cluster.neg.map == groupstats.emp_cluster.neg.idx);
            end
            h(roix) = hi;

            if ~isempty(sig_pos_timepoints)
                plot(sig_pos_timepoints,repmat(v_bar_y(roix),length(sig_pos_timepoints)),'Color',cmap(roix,:),'LineWidth',5);
            end
            if ~isempty(sig_neg_timepoints)
                plot(sig_neg_timepoints,repmat(v_bar_y(roix),length(sig_neg_timepoints),1),'Color',cmap(roix,:),'LineWidth',5);
            end
        end

        %format whole plot
        yline(0,'--')
        ylim([-3 5]);
        ylabel('2nd level t-value');
        set(gcf,'color','white')
        legend(h,labels);
        sgtitle(tit);
        xticklabels({'0','250','500','750','1000'}); xticks(1:5:25);
        %xticklabels({'150','400','650','900','1150'});
        xlabel([lower(tit) ' time'])
    end
end
