123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589 |
- %% recovery plots: comparing 60 vs 416 ms
- % col 1 --> unit ID
- % col 2 --> neuronal classification
- % col 3 --> condition 0: awake / 1: anesthetized
- % col 4 --> discriminability index isolation - 60 ms
- % col 5 --> discriminability index navigation - 60 ms
- % col 6 --> discriminability index communication - 60 ms
- % col 7 --> discriminability index isolation - 416 ms
- % col 8 --> discriminability index navigation - 416 ms
- % col 9 --> discriminability index communication - 416 ms
- % col 10 --> context effect nav-exp - 60 ms
- % col 11 --> context effect nav-unexp - 60 ms
- % col 12 --> context effect com-exp - 60 ms
- % col 13 --> context effect com-unexp - 60 ms
- % col 14 --> context effect nav-exp - 416 ms
- % col 15 --> context effect nav-unexp - 416 ms
- % col 16 --> context effect com-exp - 416 ms
- % col 17 --> context effect com-unexp - 416 ms
- % col 18 --> mean spikecount isolation nav
- % col 19 --> mean spikecount isolation com
- %%
- load('all_data.mat')
- % add data from injection data set
- inj=load('inj_data.mat'); inj=inj.all_di;
- all_di=[all_di; inj];
- % add data from chimeras data set
- all_chi=load('chi_data.mat'); all_chi=all_chi.all_di;
- all_chi(1:33,3)=2;
- all_di=[all_di; all_chi(1:33,:)];
- %%
- c_=all_di(:,2)==0; % unit classification
- aw_=all_di(:,3)==0; aw_(89:end)=0; % awake data
- an_=all_di(:,3)==1; % anesthetized data
- chi_=all_di(:,3)==2; % chimeras data
- p1=logical(c_.*aw_);
- p2=logical(c_.*an_);
- p3=logical(c_.*chi_);
- % navigation
- % ce exp-60-416 unexp-60-416 awake
- aw1=all_di(p1,10);
- aw2=all_di(p1,14);
- aw3=all_di(p1,11);
- aw4=all_di(p1,15);
- awN=[aw1 aw2 aw3 aw4];
- % ce exp-60-416 unexp-60-416 anesthetized
- an1=all_di(p2,10);
- an2=all_di(p2,14);
- an3=all_di(p2,11);
- an4=all_di(p2,15);
- anN=[an1 an2 an3 an4];
- % ce exp-60-416 unexp-60-416 chimeras
- chi1=all_di(p3,10);
- chi2=all_di(p3,14);
- chi3=all_di(p3,11);
- chi4=all_di(p3,15);
- chiN=[chi1 chi2 chi3 chi4];
- % communication
- % ce exp-60-416 unexp-60-416 awake
- aw1=all_di(p1,12);
- aw2=all_di(p1,16);
- aw3=all_di(p1,13);
- aw4=all_di(p1,17);
- awC=[aw1 aw2 aw3 aw4];
- % ce exp-60-416 unexp-60-416 anesthetized
- an1=all_di(p2,12);
- an2=all_di(p2,16);
- an3=all_di(p2,13);
- an4=all_di(p2,17);
- anC=[an1 an2 an3 an4];
- % ce exp-60-416 unexp-60-416 chimeras
- chi1=all_di(p3,12);
- chi2=all_di(p3,16);
- chi3=all_di(p3,13);
- chi4=all_di(p3,17);
- chiC=[chi1 chi2 chi3 chi4];
- % compare paired samples
- pv1=signrank(awN(:,1),awN(:,2));
- pv2=signrank(awN(:,3),awN(:,4));
- pv3=signrank(awC(:,1),awC(:,2));
- pv4=signrank(awC(:,3),awC(:,4));
- pv13=signrank(awN(:,2),awN(:,4));
- pv14=signrank(awC(:,2),awC(:,4));
- disp(CliffDelta(awN(:,3),awN(:,4)))
- disp(CliffDelta(awC(:,3),awC(:,4)))
- disp(CliffDelta(anN(:,3),anN(:,4)))
- disp(CliffDelta(anC(:,3),anC(:,4)))
- pv5=signrank(anN(:,1),anN(:,2));
- pv6=signrank(anN(:,3),anN(:,4));
- pv7=signrank(anC(:,1),anC(:,2));
- pv8=signrank(anC(:,3),anC(:,4));
- pv15=signrank(anN(:,2),anN(:,4));
- pv16=signrank(anC(:,2),anC(:,4));
- pv9=signrank(chiN(:,1),chiN(:,2));
- pv10=signrank(chiN(:,3),chiN(:,4));
- pv11=signrank(chiC(:,1),chiC(:,2));
- pv12=signrank(chiC(:,3),chiC(:,4));
- pv17=signrank(chiN(:,2),chiN(:,4));
- pv18=signrank(chiC(:,2),chiC(:,4));
- %% plots for awake data - intact - both gaps
- red_light =[0.8500,0.3250, 0.0980];
- blue_light=[0,0.4470,0.7410];
- red=[1,0.5,0.5].*red_light;
- blue=[1,0.5,0.5].*blue_light;
- green_light=[0.4863,0.3059,0.7098]; % green: [0.3922,0.8314,0.0745];
- green=[0.2980,0.1294,0.5098]; % [0.4667,0.6745,0.1882];
- colors=[blue_light;blue_light;blue;blue];
- % colors=[green_light;green_light;green;green];
- x=1:4;
- figure(1); set(gcf,'Position',[400 200 200 250])
- t=tiledlayout(2,1);
- ax1 = nexttile;
- hold(ax1);
- for i = 1:4
- h=boxchart(x(i)*ones(size(awN(:,i))), awN(:,i), 'BoxFaceColor', colors(i,:),'Notch','on');
- h.MarkerStyle='.';
- h.MarkerColor=colors(i,:);
- end
- hold on
- plot(1:2,median(awN(:,1:2)),'-o','LineWidth',1,'Color',colors(1,:),'MarkerSize',3,'MarkerFaceColor',colors(1,:))
- plot(3:4,median(awN(:,3:4)),'-o','LineWidth',1,'Color',colors(3,:),'MarkerSize',3,'MarkerFaceColor',colors(3,:))
- hold off
- xlim([0.5 4.5])
- ylabel({'echolocation'; 'effect'})
- set(gca, 'box', 'off')
- set(gca, 'Color','none')
- set(gca,'linewidth',1);set(gca,'fontsize',8);
- % plot lines for comparison
- line1=0.6;
- line2=1;
- sl=0.75;
- hold on
- plot([1 2], [1 1]*line1, '-k','LineWidth',sl)
- plot([1;1]*1,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*2,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([3 4], [1 1]*line1, '-k','LineWidth',sl)
- plot([1;1]*3,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*4,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([2 4], [1 1]*line2, '-k','LineWidth',sl)
- plot([1;1]*2,[line2,line2-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*4,[line2,line2-0.1],'-k', 'LineWidth',sl);
- ylim([-1.2 1.2])
- % plot level of significance
- if pv1 <= 0.05 && pv1 > 0.01
- text(mean(1:2)-0.05, line1+0.05, '*','HorizontalAlignment','center')
- elseif pv1 <=0.01 && pv1 > 0.001
- text(mean(1:2)-0.05, line1+0.05, '**','HorizontalAlignment','center')
- elseif pv1 <= 0.001
- text(mean(1:2)-0.05, line1+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(1:2)-0.05, line1+0.2, 'ns','FontSize',8,'HorizontalAlignment','center')
- end
- if pv2 <= 0.05 && pv2 > 0.01
- text(mean(3:4)-0.05, line1+0.05, '*','HorizontalAlignment','center')
- elseif pv2 <=0.01 && pv2 > 0.001
- text(mean(3:4)-0.05, line1+0.05, '**','HorizontalAlignment','center')
- elseif pv2 <= 0.001
- text(mean(3:4)-0.05, line1+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(3:4)-0.05, line1+0.2, 'ns','FontSize',8,'HorizontalAlignment','center')
- end
- if pv13 <= 0.05 && pv13 > 0.01
- text(mean(2:4)-0.05, line2+0.05, '*','HorizontalAlignment','center')
- elseif pv13 <=0.01 && pv13 > 0.001
- text(mean(2:4)-0.05, line2+0.05, '**','HorizontalAlignment','center')
- elseif pv13 <= 0.001
- text(mean(2:4)-0.05, line2+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(2:4)-0.05, line2+0.2, 'ns','FontSize',8,'HorizontalAlignment','center')
- end
- ax2 = nexttile;
- hold(ax2);
- for i = 1:4
- h=boxchart(x(i)*ones(size(awC(:,i))), awC(:,i), 'BoxFaceColor', colors(i,:),'Notch','on');
- h.MarkerStyle='.';
- h.MarkerColor=colors(i,:);
- end
- hold on
- plot(1:2,median(awC(:,1:2)),'-o','LineWidth',1,'Color',colors(1,:),'MarkerSize',3,'MarkerFaceColor',colors(1,:))
- plot(3:4,median(awC(:,3:4)),'-o','LineWidth',1,'Color',colors(3,:),'MarkerSize',3,'MarkerFaceColor',colors(3,:))
- hold off
- xlim([0.5 4.5])
- ylabel({'communication'; 'effect'})
- set(gca, 'box', 'off')
- set(gca, 'Color','none')
- set(gca,'linewidth',1);set(gca,'fontsize',8);
- % plot lines for comparison
- hold on
- plot([1 2], [1 1]*line1, '-k','LineWidth',sl)
- plot([1;1]*1,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*2,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([3 4], [1 1]*line1, '-k','LineWidth',sl)
- plot([1;1]*3,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*4,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([2 4], [1 1]*line2, '-k','LineWidth',sl)
- plot([1;1]*2,[line2,line2-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*4,[line2,line2-0.1],'-k', 'LineWidth',sl);
- ylim([-1.2 1.2])
- % plot level of significance
- if pv3 <= 0.05 && pv3 > 0.01
- text(mean(1:2)-0.05, line1+0.05, '*','HorizontalAlignment','center')
- elseif pv3 <=0.01 && pv3 > 0.001
- text(mean(1:2)-0.05, line1+0.05, '**','HorizontalAlignment','center')
- elseif pv3 <= 0.001
- text(mean(1:2)-0.05, line1+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(1:2)-0.05, line1+0.2, 'ns','FontSize',8,'HorizontalAlignment','center')
- end
- if pv4 <= 0.05 && pv4 > 0.01
- text(mean(3:4)-0.05, line1+0.05, '*','HorizontalAlignment','center')
- elseif pv4 <=0.01 && pv4 > 0.001
- text(mean(3:4)-0.05, line1+0.05, '**','HorizontalAlignment','center')
- elseif pv4 <= 0.001
- text(mean(3:4)-0.05, line1+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(3:4)-0.05, line1+0.2, 'ns','FontSize',8,'HorizontalAlignment','center')
- end
- if pv14 <= 0.05 && pv14 > 0.01
- text(mean(2:4)-0.05, line2+0.05, '*','HorizontalAlignment','center')
- elseif pv14 <=0.01 && pv14 > 0.001
- text(mean(2:4)-0.05, line2+0.05, '**','HorizontalAlignment','center')
- elseif pv14 <= 0.001
- text(mean(2:4)-0.05, line2+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(2:4)-0.05, line2+0.2, 'ns','FontSize',8,'HorizontalAlignment','center')
- end
- linkaxes([ax1,ax2],'x');
- xlabel(t,'gap','FontSize',8)
- % ylabel(t,'Context effect','FontSize',8)
- xticklabels(ax1,{});
- xticklabels(ax2,{'60','416','60','416'});
- t.TileSpacing = 'compact';
- exportgraphics(gcf,'E:\Users\User\Desktop\delay paper\anesthetized\figures_paper\recovery_aw.pdf',...
- 'Resolution',300','ContentType','vector','BackgroundColor','none')
- %% plots for anesthetized data - intact - both gaps
- colors=[red_light;red_light;red;red];
- x=1:4;
- figure(2); set(gcf,'Position',[600 200 200 250])
- t=tiledlayout(2,1);
- ax1 = nexttile;
- hold(ax1);
- for i = 1:4
- h=boxchart(x(i)*ones(size(anN(:,i))), anN(:,i), 'BoxFaceColor', colors(i,:),'Notch','on');
- h.MarkerStyle='.';
- h.MarkerColor=colors(i,:);
- end
- hold on
- plot(1:2,median(anN(:,1:2)),'-o','LineWidth',1,'Color',red_light,'MarkerSize',3,'MarkerFaceColor',red_light)
- plot(3:4,median(anN(:,3:4)),'-o','LineWidth',1,'Color',red,'MarkerSize',3,'MarkerFaceColor',red)
- hold off
- xlim([0.5 4.5])
- ylabel({'echolocation'; 'effect'})
- set(gca, 'box', 'off')
- set(gca, 'Color','none')
- set(gca,'linewidth',1);set(gca,'fontsize',8);
- % plot lines for comparison
- line1=1;
- line2=1.4;
- sl=0.75;
- hold on
- plot([1 2], [1 1]*line1, '-k','LineWidth',sl)
- plot([1;1]*1,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*2,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([3 4], [1 1]*line1, '-k','LineWidth',sl)
- plot([1;1]*3,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*4,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([2 4], [1 1]*line2, '-k','LineWidth',sl)
- plot([1;1]*2,[line2,line2-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*4,[line2,line2-0.1],'-k', 'LineWidth',sl);
- ylim([-1.2 1.5])
- % plot level of significance
- if pv5 <= 0.05 && pv5 > 0.01
- text(mean(1:2)-0.05, line1+0.05, '*','HorizontalAlignment','center')
- elseif pv5 <=0.01 && pv5 > 0.001
- text(mean(1:2)-0.05, line1+0.05, '**','HorizontalAlignment','center')
- elseif pv5 <= 0.001
- text(mean(1:2)-0.05, line1+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(1:2)-0.05, line1+0.2, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- if pv6 <= 0.05 && pv6 > 0.01
- text(mean(3:4)-0.05, line1+0.05, '*','HorizontalAlignment','center')
- elseif pv6 <=0.01 && pv6 > 0.001
- text(mean(3:4)-0.05, line1+0.05, '**','HorizontalAlignment','center')
- elseif pv6 <= 0.001
- text(mean(3:4)-0.05, line1+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(3:4)-0.05, line1+0.2, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- if pv15 <= 0.05 && pv15 > 0.01
- text(mean(2:4)-0.05, line2+0.05, '*','HorizontalAlignment','center')
- elseif pv15 <=0.01 && pv15 > 0.001
- text(mean(2:4)-0.05, line2+0.05, '**','HorizontalAlignment','center')
- elseif pv15 <= 0.001
- text(mean(2:4)-0.05, line2+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(2:4)-0.05, line2+0.2, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- ax2 = nexttile;
- hold(ax2);
- for i =1:4
- h=boxchart(x(i)*ones(size(anC(:,i))), anC(:,i), 'BoxFaceColor', colors(i,:),'Notch','on');
- h.MarkerStyle='.';
- h.MarkerColor=colors(i,:);
- end
- hold on
- plot(1:2,median(anC(:,1:2)),'-o','LineWidth',1,'Color',red_light,'MarkerSize',3,'MarkerFaceColor',red_light)
- plot(3:4,median(anC(:,3:4)),'-o','LineWidth',1,'Color',red_light,'MarkerSize',3,'MarkerFaceColor',red_light)
- hold off
- xlim([0.5 4.5])
- ylabel({'communication'; 'effect'})
- set(gca, 'box', 'off')
- set(gca, 'Color','none')
- set(gca,'linewidth',1);set(gca,'fontsize',8);
- % plot lines for comparison
- line1=0.8;
- line2=1.2;
- sl=0.75;
- hold on
- plot([1 2], [1 1]*line1, '-k','LineWidth',sl)
- plot([1;1]*1,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*2,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([3 4], [1 1]*line1, '-k','LineWidth',sl)
- plot([1;1]*3,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*4,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([2 4], [1 1]*line2, '-k','LineWidth',sl)
- plot([1;1]*2,[line2,line2-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*4,[line2,line2-0.1],'-k', 'LineWidth',sl);
- ylim([-1.2 1.4])
- % plot level of significance
- if pv7 <= 0.05 && pv7 > 0.01
- text(mean(1:2)-0.05, line1+0.05, '*','HorizontalAlignment','center')
- elseif pv7 <=0.01 && pv7 > 0.001
- text(mean(1:2)-0.05, line1+0.05, '**','HorizontalAlignment','center')
- elseif pv7 <= 0.001
- text(mean(1:2)-0.05, line1+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(1:2)-0.05, line1+0.2, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- if pv8 <= 0.05 && pv8 > 0.01
- text(mean(3:4)-0.05, line1+0.05, '*','HorizontalAlignment','center')
- elseif pv8 <=0.01 && pv8 > 0.001
- text(mean(3:4)-0.05, line1+0.05, '**','HorizontalAlignment','center')
- elseif pv8 <= 0.001
- text(mean(3:4)-0.05, line1+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(3:4)-0.05, line1+0.2, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- if pv16 <= 0.05 && pv16 > 0.01
- text(mean(2:4)-0.05, line2+0.05, '*','HorizontalAlignment','center')
- elseif pv16 <=0.01 && pv16 > 0.001
- text(mean(2:4)-0.05, line2+0.05, '**','HorizontalAlignment','center')
- elseif pv16 <= 0.001
- text(mean(2:4)-0.05, line2+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(2:4)-0.05, line2+0.2, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- linkaxes([ax1,ax2],'x');
- xlabel(t,'gap','FontSize',8)
- % ylabel(t,'Context effect','FontSize',8)
- xticklabels(ax1,{});
- xticklabels(ax2,{'60','416','60','416'});
- t.TileSpacing = 'compact';
- exportgraphics(gcf,'E:\Users\User\Desktop\delay paper\anesthetized\figures_paper\recovery_an.pdf',...
- 'Resolution',300','ContentType','vector','BackgroundColor','none')
- %% plot of chimeras data - anesthetized
- colors=[green_light;green_light;green;green];
- x=1:4;
- figure(3); set(gcf,'Position',[800 200 200 250])
- t=tiledlayout(2,1);
- ax1 = nexttile;
- hold(ax1);
- for i = 1:4
- h=boxchart(x(i)*ones(size(chiN(:,i))), chiN(:,i), 'BoxFaceColor', colors(i,:),'Notch','off');
- h.MarkerStyle='.';
- h.MarkerColor=colors(i,:);
- end
- hold on
- plot(1:2,median(chiN(:,1:2)),'-o','LineWidth',1,'Color',colors(1,:),'MarkerSize',3,'MarkerFaceColor',colors(1,:))
- plot(3:4,median(chiN(:,3:4)),'-o','LineWidth',1,'Color',colors(3,:),'MarkerSize',3,'MarkerFaceColor',colors(3,:))
- hold off
- xlim([0.5 4.5])
- ylabel({'fast echo'; 'effect'})
- set(gca, 'box', 'off')
- set(gca, 'Color','none')
- set(gca,'linewidth',1);set(gca,'fontsize',8);
- % plot lines for comparison
- line1=0.25;
- line2=0.65;
- sl=0.75;
- hold on
- plot([1 2], [1 1]*line1, '-k','LineWidth',sl)
- plot([1;1]*1,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*2,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([3 4], [1 1]*line1, '-k','LineWidth',sl)
- plot([1;1]*3,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*4,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([2 4], [1 1]*line2, '-k','LineWidth',sl)
- plot([1;1]*2,[line2,line2-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*4,[line2,line2-0.1],'-k', 'LineWidth',sl);
- ylim([-1.2 0.8])
- % plot level of significance
- if pv9 <= 0.05 && pv9 > 0.01
- text(mean(1:2)-0.05, line1+0.05, '*','HorizontalAlignment','center')
- elseif pv9 <=0.01 && pv9 > 0.001
- text(mean(1:2)-0.05, line1+0.05, '**','HorizontalAlignment','center')
- elseif pv9 <= 0.001
- text(mean(1:2)-0.05, line1+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(1:2)-0.05, line1+0.2, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- if pv10 <= 0.05 && pv10 > 0.01
- text(mean(3:4)-0.05, line1+0.05, '*','HorizontalAlignment','center')
- elseif pv10 <=0.01 && pv10 > 0.001
- text(mean(3:4)-0.05, line1+0.05, '**','HorizontalAlignment','center')
- elseif pv10 <= 0.001
- text(mean(3:4)-0.05, line1+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(3:4)-0.05, line1+0.2, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- if pv17 <= 0.05 && pv17 > 0.01
- text(mean(2:4)-0.05, line2+0.05, '*','HorizontalAlignment','center')
- elseif pv17 <=0.01 && pv17 > 0.001
- text(mean(2:4)-0.05, line2+0.05, '**','HorizontalAlignment','center')
- elseif pv17 <= 0.001
- text(mean(2:4)-0.05, line2+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(2:4)-0.05, line2+0.2, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- ax2 = nexttile;
- hold(ax2);
- for i = 1:4
- h=boxchart(x(i)*ones(size(chiC(:,i))), chiC(:,i), 'BoxFaceColor', colors(i,:),'Notch','off');
- h.MarkerStyle='.';
- h.MarkerColor=colors(i,:);
- end
- hold on
- plot(1:2,median(chiC(:,1:2)),'-o','LineWidth',1,'Color',colors(1,:),'MarkerSize',3,'MarkerFaceColor',colors(1,:))
- plot(3:4,median(chiC(:,3:4)),'-o','LineWidth',1,'Color',colors(3,:),'MarkerSize',3,'MarkerFaceColor',colors(3,:))
- hold off
- xlim([0.5 4.5])
- ylabel({'slow com'; 'effect'})
- set(gca, 'box', 'off')
- set(gca, 'Color','none')
- set(gca,'linewidth',1);set(gca,'fontsize',8);
- % plot lines for comparison
- hold on
- plot([1 2], [1 1]*line1, '-k','LineWidth',sl)
- plot([1;1]*1,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*2,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([3 4], [1 1]*line1, '-k','LineWidth',sl)
- plot([1;1]*3,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*4,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([2 4], [1 1]*line2, '-k','LineWidth',sl)
- plot([1;1]*2,[line2,line2-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*4,[line2,line2-0.1],'-k', 'LineWidth',sl);
- ylim([-1.2 0.8])
- % plot level of significance
- if pv11 <= 0.05 && pv11 > 0.01
- text(mean(1:2)-0.05, line1+0.05, '*','HorizontalAlignment','center')
- elseif pv11 <=0.01 && pv11 > 0.001
- text(mean(1:2)-0.05, line1+0.05, '**','HorizontalAlignment','center')
- elseif pv11 <= 0.001
- text(mean(1:2)-0.05, line1+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(1:2)-0.05, line1+0.2, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- if pv12 <= 0.05 && pv12 > 0.01
- text(mean(3:4)-0.05, line1+0.05, '*','HorizontalAlignment','center')
- elseif pv12 <=0.01 && pv12 > 0.001
- text(mean(3:4)-0.05, line1+0.05, '**','HorizontalAlignment','center')
- elseif pv12 <= 0.001
- text(mean(3:4)-0.05, line1+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(3:4)-0.05, line1+0.2, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- if pv18 <= 0.05 && pv18 > 0.01
- text(mean(2:4)-0.05, line2+0.05, '*','HorizontalAlignment','center')
- elseif pv18 <=0.01 && pv18 > 0.001
- text(mean(2:4)-0.05, line2+0.05, '**','HorizontalAlignment','center')
- elseif pv18 <= 0.001
- text(mean(2:4)-0.05, line2+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(2:4)-0.05, line2+0.2, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- linkaxes([ax1,ax2],'x');
- xlabel(t,'gap','FontSize',8)
- % ylabel(t,'Context effect','FontSize',8)
- xticklabels(ax1,{});
- xticklabels(ax2,{'60','416','60','416'});
- t.TileSpacing = 'compact';
- exportgraphics(gcf,'E:\Users\User\Desktop\delay paper\anesthetized\figures_paper\recovery_chi.pdf',...
- 'Resolution',300','ContentType','vector','BackgroundColor','none')
|