1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- %% Fig. 1F - N of session to reach learning criterion
- %% Code for Fig. 1F
- clear
- close all
- % ==========================================================================
- %% Boxplot of initial and reversal learning
- % ==========================================================================
- %Load source data at first or use the following variables
- InitialLearning = [6 15 11 7 5 14 7 15];
- ReversalLearning = [5 10 17 9 7 9 11 7];
- %Initial Learning boxplot--------------------------------------------------
- sz = 20;
- fig1 = figure('Name', 'NofSession2Learn_Initial');
- fig1.Position = [1430 480 230 420];
- boxplot(InitialLearning, 'MedianStyle', 'line', 'Labels',{'Initial'})
- hold on
- h1 = scatter(ones(size(InitialLearning)).*(1+(rand(size(InitialLearning)))/10-0.03), InitialLearning, 'b', 'filled', 'MarkerFaceAlpha', 0.5);
- h1.SizeData = 40;
- %Lim and ticks
- ylim([0 18]);
- yticks([0 5 10 15 20]);
- %Label and title
- ylabel('N of Sessions')
- title('INI - N of Session to criterion')
- box off
- %Copy object
- ax_Ini = gca;
- %Reversal Learning boxplot-------------------------------------------------
- sz = 20;
- fig2 = figure('Name', 'NofSession2Learn_Reversal');
- fig2.Position = [1430 480 230 420];
- boxplot(ReversalLearning, 'MedianStyle', 'line', 'Labels',{'Reversal'})
- hold on
- h2 = scatter(ones(size(ReversalLearning)).*(1+(rand(size(ReversalLearning)))/10-0.03), ReversalLearning, 'r', 'filled', 'MarkerFaceAlpha', 0.5);
- h2.SizeData = 40;
- %Lim and ticks
- ylim([0 18]);
- yticks([0 5 10 15 20]);
- %Label and title
- ylabel('N of Sessions')
- title('REV - N of Session to criterion')
- box off
|