123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- %% sfig. 1A-D_RT plot
- clear all
- close all
- %% dprime plot= ===========================================================
- %Prepare variables
- load('sfig1AD.mat');
- for iLearning = 1:2 %1 = Initial, 2 = Reversal
- switch iLearning
- case 1
- figure('Name', 'dprime_Initial')
- case 2
- figure('Name', 'dprime_Reversal')
- end
-
- set(gcf,'Position',[0 0 575 350])
-
- switch iLearning
- case 1 %Initial
-
- for iMouse = 1:8 %
- if iMouse <= 4 %1-4: Auditory
- ColorCode = [0.25 0.85 0.25];
- else %iMouse: 5-8: Visual
- ColorCode = [0.25 0.85 0.85];
- end
-
- h1 = plot(dprime_Initial{1,iMouse}, '-o', 'color', ColorCode, 'MarkerFaceColor', ColorCode);
- hold on
- h1.MarkerSize = 10;
- h1.LineWidth = 2;
- end
- hline(1.5, 'r');
- box off
- %Find the largest N of session from each mouse
- NofMaxSession = max(cellfun('size', dprime_Initial,1));
- xlim([0 NofMaxSession+1]);
- NofXticks = 1:1:NofMaxSession;
- xticks(NofXticks);
- ylim ([-1.0 4.5]);
- yticks([-1.0 0 1.0 2.0 3.0 4.0]);
-
- xlabel('Session')
- ylabel('d-prime')
- ax_Ini = gca;
- ax_Ini.FontSize = 12;
-
- %legend
- lgd_Ini = legend([ax_Ini.Children(8), ax_Ini.Children(4)], 'Auditory', 'Visual', 'Location', 'NorthWest');
- legend box off
- title('d-prime Initial','FontSize', 15)
- case 2 %Reversal
- for iMouse = 1:8 %
- if iMouse <= 4 %1-4: Visual
- ColorCode = [0.25 0.85 0.85];
- else %iMouse: 5-8: Auditory
- ColorCode = [0.25 0.85 0.25];
- end
-
- h2 = plot(dprime_Reversal{1,iMouse}, '-o', 'color', ColorCode, 'MarkerFaceColor', ColorCode);
- hold on
- h2.MarkerSize = 10;
- h2.LineWidth = 2;
- end
- hline(1.5, 'r');
- box off
- %Find the largest N of session from each mouse
- NofMaxSession = max(cellfun('size', dprime_Reversal,1));
- xlim([0 NofMaxSession+1]);
- NofXticks = 1:1:NofMaxSession;
- xticks(NofXticks);
- ylim ([-1.0 4.5]);
- yticks([-1.0 0 1.0 2.0 3.0 4.0]);
-
- xlabel('Session')
- ylabel('d-prime')
- ax_Rev = gca;
- ax_Rev.FontSize = 12;
-
- %legend
- lgd = legend([ax_Rev.Children(8), ax_Rev.Children(4)], 'Visual', 'Auditory', 'Location', 'NorthWest');
- legend box off
- title('d-prime Reversal','FontSize', 15)
- end %swich
- end %iLearning
- disp(' ');
|