123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442 |
- close all
- %% plot discriminability index across gaps
- 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; % 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_);
- % echolocation
- % di 60-416-3500 awake
- aw1=all_di(p1,5);
- aw2=all_di(p1,8);
- aw3=all_di(p1,7);
- awN=[aw1 aw2 aw3];
- % di 60-416-3500 anesthetized
- an1=all_di(p2,5);
- an2=all_di(p2,8);
- an3=all_di(p2,7);
- anN=[an1 an2 an3];
- % di 60-416-3500 chimeras
- chi1=all_di(p3,5);
- chi2=all_di(p3,8);
- chi3=all_di(p3,7);
- chiN=[chi1 chi2 chi3];
- % communication
- % di 60-416-3500 awake
- aw1=all_di(p1,6);
- aw2=all_di(p1,9);
- aw3=all_di(p1,7);
- awC=[aw1 aw2 aw3];
- % di 60-416-3500 anesthetized
- an1=all_di(p2,6);
- an2=all_di(p2,9);
- an3=all_di(p2,7);
- anC=[an1 an2 an3];
- % di 60-416-3500 chimeras
- chi1=all_di(p3,6);
- chi2=all_di(p3,9);
- chi3=all_di(p3,7);
- chiC=[chi1 chi2 chi3];
- % compare paired samples
- pv1=signrank(awN(:,1),awN(:,3));
- pv2=signrank(awN(:,2),awN(:,3));
- pv3=signrank(awC(:,1),awC(:,3));
- pv4=signrank(awC(:,2),awC(:,3));
- pv5=signrank(anN(:,1),anN(:,3));
- pv6=signrank(anN(:,2),anN(:,3));
- pv7=signrank(anC(:,1),anC(:,3));
- pv8=signrank(anC(:,2),anC(:,3));
- pv9=signrank(chiN(:,1),chiN(:,3));
- pv10=signrank(chiN(:,2),chiN(:,3));
- pv11=signrank(chiC(:,1),chiC(:,3));
- pv12=signrank(chiC(:,2),chiC(:,3));
- %% plots for anesthetized 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]; % green: [0.4667,0.6745,0.1882];
- figure(1); set(gcf,'Position',[400 200 170 250])
- t=tiledlayout(2,1);
- ax1 = nexttile;
- h=boxchart(awN, 'BoxFaceColor',blue,'Notch','on');
- h.MarkerStyle='.';
- h.MarkerColor=blue;
- hold on
- plot(1:2,median(awN(:,1:2)),'-o','LineWidth',1,'Color',blue,'MarkerSize',3,'MarkerFaceColor',blue)
- plot(2:3,median(awN(:,2:3)),'-o','LineWidth',1,'Color',blue,'MarkerSize',3,'MarkerFaceColor',blue)
- hold off
- ylabel('echolocation')
- 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 3], [1 1]*line1, '-k','LineWidth',sl)
- plot([1;1]*1,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*3,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([2 3], [1 1]*line2, '-k','LineWidth',sl)
- plot([1;1]*2,[line2,line2-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*3,[line2,line2-0.1],'-k', 'LineWidth',sl);
- ylim([-1.2 1.5])
- % plot level of significance
- if pv1 <= 0.05 && pv1 > 0.01
- text(mean(1:3)-0.05, line1+0.05, '*','HorizontalAlignment','center')
- elseif pv1 <=0.01 && pv1 > 0.001
- text(mean(1:3)-0.05, line1+0.05, '**','HorizontalAlignment','center')
- elseif pv1 <= 0.001
- text(mean(1:3)-0.05, line1+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(1:3)-0.05, line1+0.05, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- if pv2 <= 0.05 && pv2 > 0.01
- text(mean(2:3)-0.05, line2+0.05, '*','HorizontalAlignment','center')
- elseif pv2 <=0.01 && pv2 > 0.001
- text(mean(2:3)-0.05, line2+0.05, '**','HorizontalAlignment','center')
- elseif pv2 <= 0.001
- text(mean(2:3)-0.05, line2+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(2:3)-0.05, line2+0.05, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- ax2 = nexttile;
- h=boxchart(awC, 'BoxFaceColor',blue_light,'Notch','on');
- h.MarkerStyle='.';
- h.MarkerColor=blue_light;
- hold on
- plot(1:2,median(awC(:,1:2)),'-o','LineWidth',1,'Color',blue_light,'MarkerSize',3,'MarkerFaceColor',blue_light)
- plot(2:3,median(awC(:,2:3)),'-o','LineWidth',1,'Color',blue_light,'MarkerSize',3,'MarkerFaceColor',blue_light)
- hold off
- ylabel('communication')
- 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 3], [1 1]*line1, '-k','LineWidth',sl)
- plot([1;1]*1,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*3,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([2 3], [1 1]*line2, '-k','LineWidth',sl)
- plot([1;1]*2,[line2,line2-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*3,[line2,line2-0.1],'-k', 'LineWidth',sl);
- ylim([-1.2 1.5])
- % plot level of significance
- if pv3 <= 0.05 && pv3 > 0.01
- text(mean(1:3)-0.05, line1+0.05, '*','HorizontalAlignment','center')
- elseif pv3 <=0.01 && pv3 > 0.001
- text(mean(1:3)-0.05, line1+0.05, '**','HorizontalAlignment','center')
- elseif pv3 <= 0.001
- text(mean(1:3)-0.05, line1+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(1:3)-0.05, line1+0.1, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- if pv4 <= 0.05 && pv4 > 0.01
- text(mean(2:3)-0.05, line2+0.05, '*','HorizontalAlignment','center')
- elseif pv4 <=0.01 && pv4 > 0.001
- text(mean(2:3)-0.05, line2+0.05, '**','HorizontalAlignment','center')
- elseif pv4 <= 0.001
- text(mean(2:3)-0.05, line2+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(2:3)-0.05, line2+0.1, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- linkaxes([ax1,ax2],'x');
- xlabel(t,'gap','FontSize',8)
- ylabel(t,'Discriminability index','FontSize',8)
- xticklabels(ax1,{});
- xticklabels(ax2,{'60','416','no'});
- t.TileSpacing = 'compact';
- exportgraphics(gcf,'E:\Users\User\Desktop\delay paper\anesthetized\figures_paper\recovery_di_aw.pdf',...
- 'Resolution',300','ContentType','vector','BackgroundColor','none')
- %% plots for anesthetized data - intact - both gaps
- figure(2); set(gcf,'Position',[600 200 170 250])
- t=tiledlayout(2,1);
- ax1 = nexttile;
- h=boxchart(anN, 'BoxFaceColor',red,'Notch','on');
- h.MarkerStyle='.';
- h.MarkerColor=red;
- hold on
- plot(1:2,median(anN(:,1:2)),'-o','LineWidth',1,'Color',red,'MarkerSize',3,'MarkerFaceColor',red)
- plot(2:3,median(anN(:,2:3)),'-o','LineWidth',1,'Color',red,'MarkerSize',3,'MarkerFaceColor',red)
- hold off
- ylabel('echolocation')
- 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 3], [1 1]*line1, '-k','LineWidth',sl)
- plot([1;1]*1,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*3,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([2 3], [1 1]*line2, '-k','LineWidth',sl)
- plot([1;1]*2,[line2,line2-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*3,[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:3)-0.05, line1+0.05, '*','HorizontalAlignment','center')
- elseif pv5 <=0.01 && pv5 > 0.001
- text(mean(1:3)-0.05, line1+0.05, '**','HorizontalAlignment','center')
- elseif pv5 <= 0.001
- text(mean(1:3)-0.05, line1+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(1:3)-0.05, line1+0.2, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- if pv6 <= 0.05 && pv6 > 0.01
- text(mean(2:3)-0.05, line2+0.05, '*','HorizontalAlignment','center')
- elseif pv6 <=0.01 && pv6 > 0.001
- text(mean(2:3)-0.05, line2+0.05, '**','HorizontalAlignment','center')
- elseif pv6 <= 0.001
- text(mean(2:3)-0.05, line2+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(2:3)-0.05, line2+0.2, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- ax2 = nexttile;
- h=boxchart(anC, 'BoxFaceColor',red_light,'Notch','on');
- h.MarkerStyle='.';
- h.MarkerColor=red_light;
- hold on
- plot(1:2,median(anC(:,1:2)),'-o','LineWidth',1,'Color',red_light,'MarkerSize',3,'MarkerFaceColor',red_light)
- plot(2:3,median(anC(:,2:3)),'-o','LineWidth',1,'Color',red_light,'MarkerSize',3,'MarkerFaceColor',red_light)
- hold off
- ylabel('communication')
- 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 3], [1 1]*line1, '-k','LineWidth',sl)
- plot([1;1]*1,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*3,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([2 3], [1 1]*line2, '-k','LineWidth',sl)
- plot([1;1]*2,[line2,line2-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*3,[line2,line2-0.1],'-k', 'LineWidth',sl);
- ylim([-1.2 1.5])
- % plot level of significance
- if pv7 <= 0.05 && pv7 > 0.01
- text(mean(1:3)-0.05, line1+0.05, '*','HorizontalAlignment','center')
- elseif pv7 <=0.01 && pv7 > 0.001
- text(mean(1:3)-0.05, line1+0.05, '**','HorizontalAlignment','center')
- elseif pv7 <= 0.001
- text(mean(1:3)-0.05, line1+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(1:3)-0.05, line1+0.2, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- if pv8 <= 0.05 && pv8 > 0.01
- text(mean(2:3)-0.05, line2+0.05, '*','HorizontalAlignment','center')
- elseif pv8 <=0.01 && pv8 > 0.001
- text(mean(2:3)-0.05, line2+0.05, '**','HorizontalAlignment','center')
- elseif pv8 <= 0.001
- text(mean(2:3)-0.05, line2+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(2:3)-0.05, line2+0.2, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- linkaxes([ax1,ax2],'x');
- xlabel(t,'gap','FontSize',8)
- ylabel(t,'Discriminability index','FontSize',8)
- xticklabels(ax1,{});
- xticklabels(ax2,{'60','416','no'});
- t.TileSpacing = 'compact';
- exportgraphics(gcf,'E:\Users\User\Desktop\delay paper\anesthetized\figures_paper\recovery_di_an.pdf',...
- 'Resolution',300','ContentType','vector','BackgroundColor','none')
- %% plots for chimeras - anesthetized
- figure(3); set(gcf,'Position',[800 200 170 250])
- t=tiledlayout(2,1);
- ax1 = nexttile;
- h=boxchart(chiN, 'BoxFaceColor',green,'Notch','off');
- h.MarkerStyle='.';
- h.MarkerColor=green;
- hold on
- plot(1:2,median(chiN(:,1:2)),'-o','LineWidth',1,'Color',green,'MarkerSize',3,'MarkerFaceColor',green)
- plot(2:3,median(chiN(:,2:3)),'-o','LineWidth',1,'Color',green,'MarkerSize',3,'MarkerFaceColor',green)
- hold off
- ylabel('fast echo')
- 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 3], [1 1]*line1, '-k','LineWidth',sl)
- plot([1;1]*1,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*3,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([2 3], [1 1]*line2, '-k','LineWidth',sl)
- plot([1;1]*2,[line2,line2-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*3,[line2,line2-0.1],'-k', 'LineWidth',sl);
- ylim([-1.2 1.5])
- % plot level of significance
- if pv9 <= 0.05 && pv9 > 0.01
- text(mean(1:3)-0.05, line1+0.05, '*','HorizontalAlignment','center')
- elseif pv9 <=0.01 && pv9 > 0.001
- text(mean(1:3)-0.05, line1+0.05, '**','HorizontalAlignment','center')
- elseif pv9 <= 0.001
- text(mean(1:3)-0.05, line1+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(1:3)-0.05, line1+0.2, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- if pv10 <= 0.05 && pv10 > 0.01
- text(mean(2:3)-0.05, line2+0.05, '*','HorizontalAlignment','center')
- elseif pv10 <=0.01 && pv2 > 0.001
- text(mean(2:3)-0.05, line2+0.05, '**','HorizontalAlignment','center')
- elseif pv10 <= 0.001
- text(mean(2:3)-0.05, line2+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(2:3)-0.05, line2+0.2, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- ax2 = nexttile;
- h=boxchart(chiC, 'BoxFaceColor',green_light,'Notch','off');
- h.MarkerStyle='.';
- h.MarkerColor=green_light;
- hold on
- plot(1:2,median(chiC(:,1:2)),'-o','LineWidth',1,'Color',green_light,'MarkerSize',3,'MarkerFaceColor',green_light)
- plot(2:3,median(chiC(:,2:3)),'-o','LineWidth',1,'Color',green_light,'MarkerSize',3,'MarkerFaceColor',green_light)
- hold off
- ylabel('slow com')
- 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 3], [1 1]*line1, '-k','LineWidth',sl)
- plot([1;1]*1,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*3,[line1,line1-0.1],'-k', 'LineWidth',sl);
- plot([2 3], [1 1]*line2, '-k','LineWidth',sl)
- plot([1;1]*2,[line2,line2-0.1],'-k', 'LineWidth',sl);
- plot([1;1]*3,[line2,line2-0.1],'-k', 'LineWidth',sl);
- ylim([-1.2 1.5])
- % plot level of significance
- if pv11 <= 0.05 && pv11 > 0.01
- text(mean(1:3)-0.05, line1+0.05, '*','HorizontalAlignment','center')
- elseif pv11 <=0.01 && pv11 > 0.001
- text(mean(1:3)-0.05, line1+0.05, '**','HorizontalAlignment','center')
- elseif pv11 <= 0.001
- text(mean(1:3)-0.05, line1+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(1:3)-0.05, line1+0.2, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- if pv12 <= 0.05 && pv12 > 0.01
- text(mean(2:3)-0.05, line2+0.05, '*','HorizontalAlignment','center')
- elseif pv12 <=0.01 && pv12 > 0.001
- text(mean(2:3)-0.05, line2+0.05, '**','HorizontalAlignment','center')
- elseif pv12 <= 0.001
- text(mean(2:3)-0.05, line2+0.05, '***','HorizontalAlignment','center')
- else
- text(mean(2:3)-0.05, line2+0.2, 'ns','FontSize',7,'HorizontalAlignment','center')
- end
- linkaxes([ax1,ax2],'x');
- xlabel(t,'gap','FontSize',8)
- ylabel(t,'Discriminability index','FontSize',8)
- xticklabels(ax1,{});
- xticklabels(ax2,{'60','416','no'});
- t.TileSpacing = 'compact';
- exportgraphics(gcf,'E:\Users\User\Desktop\delay paper\anesthetized\figures_paper\recovery_di_chi.pdf',...
- 'Resolution',300','ContentType','vector','BackgroundColor','none')
|