123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- %% fig. S6G, H & K - Anticipatory Lick
- % Load necessary data for fig.S4E at first
- clear all
- close all
- % ==========================================================================
- %% Load data
- % ==========================================================================
- %Prepare variables
- load('figS6G.mat');
- load('figS6H.mat');
- load('figS6K.mat');
- % ==================================================================
- %% figS6G: Lick trial propotion
- % ==================================================================
- fig1 = figure('Name','NofLickHistogram_Hit');
- fig1.Position = [511 526 950 330];
- for iPhase = 1:4
- switch iPhase
- case 1
- subplot(1,2,iPhase);
- EColor = [0.75 0.75 0.75]; FColor = [0.75 0.75 0.75];
- case 2
- subplot(1,2,iPhase-1);
- EColor = 'r'; FColor = 'r';
- case 3
- subplot(1,2,iPhase-1);
- EColor = [0.75 0.75 0.75]; FColor = [0.75 0.75 0.75];
- case 4
- subplot(1,2,iPhase-2);
- EColor = 'r'; FColor = 'r';
- end
-
- %ALick_Proportion
- x = 1:1:size(ALick_Proportion{iPhase},2);
- h1 = bar(x, ALick_Proportion{iPhase}, 'EdgeColor', EColor, 'FaceColor', FColor);
- hold on;
-
- if (iPhase == 1 || iPhase == 3)
- xlim([-1 15]);
- xticks([1 6 11 16]);
- xticklabels({'0', '5', '10', '15'});
- ylim([0 1]);
- xlabel('N of Lick during delay (2.0 s)')
- end
-
- box off
- hold on
- end%iPhase
- suptitle('Hit trial Lick during delay - Mouse averaged - overlay')
- % ==================================================================
- %% figS6H: Lickprobability line plot
- % ==================================================================
- fig2 = figure('Name','HitLickProbability_MovAverage');
- TimeWinFrame = [-15:1:120]; %-0.5s to 4s after stimulus presentation
- fs = 30;
- for iPhase = 1:4
- switch iPhase
- case 1 %Initial Naive
- LineColor = 'k';
- subplot(1,2,1);
- case 2 %Initial Expert
- LineColor = 'r';
- subplot(1,2,1);
- ylabel('Lick probability in Hit trials (%)')
- title('Initial')
- case 3 %Reversal Naive
- LineColor = 'k';
- subplot(1,2,2);
- case 4 %Reversal Expert
- LineColor = 'r';
- subplot(1,2,2);
- ylabel('Lick probability in Hit trials (%)')
- title('Reversal')
- end%switch
-
- h2=shadedErrorBar(TimeWinFrame/fs, MeanLickProbability{iPhase}, SEMLickProbability{iPhase}, 'lineprops', LineColor);
- h2.mainLine.LineWidth = 1.5;
- hold on;
- set([h2.edge], 'Visible', 'off')
-
- h3 = legend({'Naive', 'Expert'});
- h3.AutoUpdate = 'off';
- legend boxoff
-
- xlim([-0.5 4.0])
- xticks([0 2 4]);
- ylim([0 20])
- yticks([0 10 20]);
- box off
- %saxis square
- end%iPhase
- suptitle('Lick probability in Hit trial');
- % =========================================================================
- %% figS6K - Anticipatory Lick freq per trial vs the proportion of ramp cell
- % =========================================================================
- figure('Name','AnticipatoryLick-vs-RamCells');
- fig3 = gcf;
- fig3.Position = [421 645 630 320];
- for iPhase = 1:2 %Only Expert phase
-
- switch iPhase
- case 1
- ProportionRampCell = ProportionRampCell_Ini;
- subplot(1,2,1);
- xrange = [0 5];
- xt = [0 1 2 3 4 5];
- GraphTitle = 'Initial Learning';
- case 2
- ProportionRampCell = ProportionRampCell_Rev;
- subplot(1,2,2);
- xrange = [0 5];
- xt = [0 1 2 3 4 5];
- GraphTitle = 'Reversal Learning';
- end%switch
-
- sz = 75;
- scatter(NofALick_per_Trial(:, iPhase), ProportionRampCell*100, sz, 'k');
- title(GraphTitle)
- axis square
- xlim(xrange);
- ylim([0 70]);
- box off
- xlabel('N of anticipatory licks during the delay')
- ylabel('Proportion of RampCells (%)')
- xticks(xt);
- yticks([0 35 70]);
- end
- suptitle('AnticipatoryLick - RampCell ')
|