function [] = figure1d;

%
% function [] = figure1d;
%
% plots raw version of figure 1 of Einhäuser, W., Methfessel, P., & Bendixen, A. (2017). Newly acquired audio-visual associations bias perception in binocular rivalry. Vision Research, 133, 121-129. doi: 10.1016/j.visres.2017.02.001
%
%

% 

% load data file
load eyeTraces xEye oknGain timeSinceTrialStart;

% select example excerpt
obsNum = 2; % observer ID
block =  1; % rivalry block
trial  = 3; % rivalry trial in block
tStart = 10.3;% start of plot window [s]
tEnd   = 20;% end of plot window [s]


figure(1);
clf;
subplot(2,1,1);
plot(timeSinceTrialStart{obsNum,block,trial},xEye{obsNum,block,trial},'k');
xlim([tStart tEnd]);
ylim([400 540]);
xlabel('time [s]');
ylabel('horiz. eye position [au]');

subplot(2,1,2);
plot(timeSinceTrialStart{obsNum,block,trial},oknGain{obsNum,block,trial},'k');
ylim([-1 1]);
line([tStart tEnd],[0 0]); 
xlim([tStart tEnd]);
xlabel('time [s]');
ylabel('gain');
