function sd_response_comparisons(plain_extractedmatrix,conjoined_filename,hy,epoch_dividers,parameter_colors,stsd_parameters,number_of_IPIs)
%this guy plots everyone in a v b type fashion   (colors are by epoch but could be changed st face color=epoch, edge color=trial)

marker_size=12;
line_width=1;

var_o=number_of_IPIs+1;
var_a=number_of_IPIs+2;
var_b=number_of_IPIs+3;

parameter_labels={'PSC' 'Q' 'latency'}

figure

if ~isempty(epoch_dividers),trials_that_were_during_this_epoch=[1:epoch_dividers(1)-.5];else trials_that_were_during_this_epoch=1:size(plain_extractedmatrix,2);end
for epoch=1:length(epoch_dividers)+1
    fiddy_cols=find(plain_extractedmatrix(1,trials_that_were_during_this_epoch,1)==1);
	onefiddy_cols=find(plain_extractedmatrix(1,trials_that_were_during_this_epoch,1)==2);
    
    for parameter_sheet=1:2         %first the PSCs, then charge, then latency
		subplot(3,3,1+((parameter_sheet-1)*3))
		plot (plain_extractedmatrix(var_o,fiddy_cols,parameter_sheet),plain_extractedmatrix(var_a,fiddy_cols,parameter_sheet),'s','markersize',marker_size,'markerfacecolor',parameter_colors{epoch},'markeredgecolor',parameter_colors{epoch},'linewidth',line_width),hold on
        plot (plain_extractedmatrix(var_o,onefiddy_cols,parameter_sheet),plain_extractedmatrix(var_a,onefiddy_cols,parameter_sheet),'o','markersize',marker_size,'markerfacecolor',parameter_colors{epoch},'markeredgecolor',parameter_colors{epoch},'linewidth',line_width),hold on
        if epoch==1
            xlabel(strcat(parameter_labels{parameter_sheet},'_o'),'fontsize',20, 'fontname', 'Book Antiqua','fontweight','bold')
            ylabel(strcat(parameter_labels{parameter_sheet},'_a'),'fontsize',20, 'fontname', 'Book Antiqua','fontweight','bold')
        end
        
        subplot(3,3,2+((parameter_sheet-1)*3))
		plot (plain_extractedmatrix(var_o,fiddy_cols,parameter_sheet),plain_extractedmatrix(var_b,fiddy_cols,parameter_sheet),'s','markersize',marker_size,'markerfacecolor',parameter_colors{epoch},'markeredgecolor',parameter_colors{epoch},'linewidth',line_width),hold on
        plot (plain_extractedmatrix(var_o,onefiddy_cols,parameter_sheet),plain_extractedmatrix(var_b,onefiddy_cols,parameter_sheet),'o','markersize',marker_size,'markerfacecolor',parameter_colors{epoch},'markeredgecolor',parameter_colors{epoch},'linewidth',line_width),hold on
        if epoch==1
            xlabel(strcat(parameter_labels{parameter_sheet},'_o'),'fontsize',20, 'fontname', 'Book Antiqua','fontweight','bold')
            ylabel(strcat(parameter_labels{parameter_sheet},'_b'),'fontsize',20, 'fontname', 'Book Antiqua','fontweight','bold')
            if parameter_sheet==1, title(conjoined_filename,'fontsize',30, 'fontname', 'Book Antiqua','fontweight','bold'),legend('50 ms','150 ms'),end
        end
        
        subplot(3,3,3+((parameter_sheet-1)*3))
		plot (plain_extractedmatrix(var_a,fiddy_cols,parameter_sheet),plain_extractedmatrix(var_b,fiddy_cols,parameter_sheet),'s','markersize',marker_size,'markerfacecolor',parameter_colors{epoch},'markeredgecolor',parameter_colors{epoch},'linewidth',line_width),hold on
        plot (plain_extractedmatrix(var_a,onefiddy_cols,parameter_sheet),plain_extractedmatrix(var_b,onefiddy_cols,parameter_sheet),'o','markersize',marker_size,'markerfacecolor',parameter_colors{epoch},'markeredgecolor',parameter_colors{epoch},'linewidth',line_width),hold on
        if epoch==1
            xlabel(strcat(parameter_labels{parameter_sheet},'_a'),'fontsize',20, 'fontname', 'Book Antiqua','fontweight','bold')
            ylabel(strcat(parameter_labels{parameter_sheet},'_b'),'fontsize',20, 'fontname', 'Book Antiqua','fontweight','bold')
        end
    end
    
    if length(epoch_dividers)>epoch,trials_that_were_during_this_epoch=[epoch_dividers(epoch)+.5 :epoch_dividers(epoch+1)-.5];
    elseif length(epoch_dividers)==epoch,trials_that_were_during_this_epoch=[epoch_dividers(epoch)+.5:number_of_trials];
    end
end

set(gcf,'position',[1 31 1600 1094])
for i=1:parameter_sheet
    xlimminz=[];xlimmaxz=[];ylimminz=[];ylimmaxz=[];
    for j=1:3
        xlimminz=[xlimminz min(get(subplot(3,3,j+((i-1)*3)),'xlim'))];
        xlimmaxz=[xlimmaxz max(get(subplot(3,3,j+((i-1)*3)),'xlim'))];
        ylimminz=[ylimminz min(get(subplot(3,3,j+((i-1)*3)),'ylim'))];
        ylimmaxz=[ylimmaxz max(get(subplot(3,3,j+((i-1)*3)),'ylim'))];
    end
     for k=1:3
        set(subplot(3,3,k+((i-1)*3)), 'xlim',[min(xlimminz) max(xlimmaxz)])
        set(subplot(3,3,k+((i-1)*3)), 'ylim',[min(ylimminz) max(ylimmaxz)])
     end
end
% set(handlez(1:9,parameter),'xlim',[min(min(cell2mat(get(handlez(1:9,parameter),'xlim')))) max(max(cell2mat(get(handlez(1:9,parameter),'xlim'))))]);