function [] = figure3_human;

%
% function [] = figure3_human;
%
% plots the rightmost column of figure 3 of the paper
%
% Marx, S., Gruenhage, G., Walper, D., Rutishauser, U., Einhäuser,
% W. (2015). Competition with and without priority control: linking
% rivalry to attention through winner-take-all networks with
% memory. Annals of the New York Academy of Sciences. 1339, 138-153.


% load dominance times (raw durations a button was presssed)
load dataExp1 durationsLeft durationsRight 

% these are the conditions used for the paper, here other subjects or
% levels can be chosen

subNum = 2;
leftEyeContrast  = 3;
rightEyeContrast = 3;

figure(3);
clf;

allDurations = [durationsLeft{subNum,leftEyeContrast,rightEyeContrast};...
  durationsRight{subNum,leftEyeContrast,rightEyeContrast}];
	
hist(allDurations(:),[0:15]);
axis([-.5 15.5 0 25]);
ylabel('#');
xlabel('dominance duration [s]');


