-
Notifications
You must be signed in to change notification settings - Fork 2
/
sample_plot.m
37 lines (31 loc) · 1.34 KB
/
sample_plot.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
%%
cur_expt = 1; % chr2_during
% cur_expt = 2; % chr2_between
% cur_expt = 3; % arch
% cur_expt = 4; % eyfp
maxTrials = 100;
reachEnd_zlim = [-15 30];
x_lim = [-30 10];
y_lim = [-20 10];
retrainSessions = 1 : 2;
laserOnSessions = 3 : 12;
occludeSessions = 13 : 22;
retrainColor = 'k';
laserOnColor = exptSummary(cur_expt).experimentInfo.laserWavelength;
if strcmpi(laserOnColor,'any')
laserOnColor = 'c';
end
occludeColor = 'r';
toPlot = nanmean(exptSummary(cur_expt).num_trials,2);
numValidPts = sum(~isnan(exptSummary(1).num_trials),2);
e_bars = nanstd(exptSummary(cur_expt).num_trials,0,2) ./ sqrt(numValidPts);
hold on
scatter(retrainSessions,toPlot(retrainSessions),'markeredgecolor',retrainColor,'markerfacecolor',retrainColor);
scatter(laserOnSessions,toPlot(laserOnSessions),'markeredgecolor',laserOnColor,'markerfacecolor',laserOnColor);
scatter(occludeSessions,toPlot(occludeSessions),'markeredgecolor',occludeColor,'markerfacecolor',occludeColor);
errorbar(retrainSessions,toPlot(retrainSessions),e_bars(retrainSessions),retrainColor,'linestyle','none');
errorbar(laserOnSessions,toPlot(laserOnSessions),e_bars(laserOnSessions),laserOnColor,'linestyle','none');
errorbar(occludeSessions,toPlot(occludeSessions),e_bars(occludeSessions),occludeColor,'linestyle','none');
set(gca,'ylim',[0 100]);
set(gca,'xtick',[1,22])
title('number of trials')