SFig9.m 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. close all;
  2. clear;
  3. % plot classification in response to natural sounds
  4. int=load('all_data.mat'); int=int.all_di;
  5. chi=load('chi_data.mat'); chi=chi.all_di;
  6. pt=load('pt_data.mat'); pt=pt.all_di;
  7. pair=load('pair_data.mat'); pair=pair.all_di;
  8. awake_=int(:,3)==0;
  9. int_1=int(:,3)==1;
  10. int_2=pt(:,3)==1;
  11. chi_1=chi(:,3)==0;
  12. chi_2=pt(:,3)==2;
  13. pt_=pt(:,3)==3;
  14. pair_=pair(:,3)==0;
  15. % classification lists
  16. awake=int(awake_,2);
  17. anes_intact=[int(int_1,2); pt(int_2,2)];
  18. chi_alone=chi(chi_1,2);
  19. pair_chi=pt(chi_2,2);
  20. pair_inj=pair(pair_,2);
  21. %% plotting
  22. grey_light=[0.6 0.6 0.6];
  23. grey=[0.3 0.3 0.3];
  24. figure(1); set(gcf, 'Position', [200, 400, 700, 180])
  25. subplot(151)
  26. y=histc(awake,0:4);
  27. % y=y/max(y)*100;
  28. b=bar(y([2,3,4,5,1],1),'FaceColor', grey_light);
  29. b.FaceColor = 'flat';
  30. b.CData(5,:) = grey;
  31. get_y = get(gca, 'YTick');
  32. y_pos=max(get_y)*0.75;
  33. y_pos2=max(get_y)*0.60;
  34. text(1,y_pos,['n=' num2str(y(1))],'FontSize',8,'Color',grey);
  35. text(1,y_pos2,['n=' num2str(sum(y))],'FontSize',8,'Color',grey_light);
  36. xticklabels({'ech','com','ech>com','com>ech','ech=com'})
  37. ylabel('# of units')
  38. title('\fontsize{8}awake','FontWeight', 'Normal','FontSize',8)
  39. set(gca, 'box', 'off')
  40. set(gca, 'Color','none')
  41. set(gca,'linewidth',1);set(gca,'fontsize',8);
  42. subplot(152)
  43. y=histc(anes_intact,0:4);
  44. % y=y/max(y)*100;
  45. b=bar(y([2,3,4,5,1],1),'FaceColor',grey_light);
  46. b.FaceColor = 'flat';
  47. b.CData(5,:) =grey;
  48. get_y = get(gca, 'YTick');
  49. y_pos=max(get_y)*0.75;
  50. y_pos2=max(get_y)*0.60;
  51. text(1,y_pos,['n=' num2str(y(1))],'FontSize',8,'Color',grey);
  52. text(1,y_pos2,['n=' num2str(sum(y))],'FontSize',8,'Color',grey_light);
  53. xticklabels({'ech','com','ech>com','com>ech','ech=com'})
  54. title('\fontsize{8}anesthetized','FontWeight', 'Normal')
  55. set(gca, 'box', 'off')
  56. set(gca, 'Color','none')
  57. set(gca,'linewidth',1);set(gca,'fontsize',8);
  58. subplot(153)
  59. y=histc(chi_alone,0:4);
  60. % y=y/max(y)*100;
  61. b=bar(y([2,3,4,5,1],1),'FaceColor',grey_light);
  62. b.FaceColor = 'flat';
  63. b.CData(5,:) = grey;
  64. get_y = get(gca, 'YTick');
  65. y_pos=max(get_y)*0.75;
  66. y_pos2=max(get_y)*0.60;
  67. text(1,y_pos,['n=' num2str(y(1))],'FontSize',8,'Color',grey);
  68. text(1,y_pos2,['n=' num2str(sum(y))],'FontSize',8,'Color',grey_light);
  69. xticklabels({'ech','com','ech>com','com>ech','ech=com'})
  70. title('\fontsize{8}chimeras alone','FontWeight', 'Normal')
  71. set(gca, 'box', 'off')
  72. set(gca, 'Color','none')
  73. set(gca,'linewidth',1);set(gca,'fontsize',8);
  74. subplot(154)
  75. y=histc(pair_chi,0:4);
  76. b=bar(y([2,3,4,5,1],1),'FaceColor',grey_light);
  77. b.FaceColor = 'flat';
  78. b.CData(5,:) = grey;
  79. get_y = get(gca, 'YTick');
  80. y_pos=max(get_y)*0.75;
  81. y_pos2=max(get_y)*0.60;
  82. text(1,y_pos,['n=' num2str(y(1))],'FontSize',8,'Color',grey);
  83. text(1,y_pos2,['n=' num2str(sum(y))],'FontSize',8,'Color',grey_light);
  84. xticklabels({'ech','com','ech>com','com>ech','ech=com'})
  85. title('\fontsize{8}paired chimeras','FontWeight', 'Normal')
  86. set(gca, 'box', 'off')
  87. set(gca, 'Color','none')
  88. set(gca,'linewidth',1);set(gca,'fontsize',8);
  89. subplot(155)
  90. y=histc(pair_inj,0:4);
  91. % y=y/max(y)*100;
  92. b=bar(y([2,3,4,5,1],1),'FaceColor',grey_light);
  93. b.FaceColor = 'flat';
  94. b.CData(5,:) = grey;
  95. get_y = get(gca, 'YTick');
  96. y_pos=max(get_y)*0.75;
  97. y_pos2=max(get_y)*0.60;
  98. text(1,y_pos,['n=' num2str(y(1))],'FontSize',8,'Color',grey);
  99. text(1,y_pos2,['n=' num2str(sum(y))],'FontSize',8,'Color',grey_light);
  100. xticklabels({'ech','com','ech>com','com>ech','ech=com'});
  101. title('\fontsize{8}paired injection','FontWeight', 'Normal')
  102. set(gca, 'box', 'off')
  103. set(gca, 'Color','none')
  104. set(gca,'linewidth',1);set(gca,'fontsize',8);
  105. % exportgraphics(gcf,'E:\Users\User\Desktop\delay paper\anesthetized\figures_paper\class_sets.pdf',...
  106. % 'Resolution',300','ContentType','vector','BackgroundColor','none')