-
Notifications
You must be signed in to change notification settings - Fork 5
/
figure6.m
64 lines (57 loc) · 2.27 KB
/
figure6.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
function[]=figure6(varargin)
% FIGURE6 Make figure 6 from the manuscrip written by Luo, Bondy, et al.
%
% The figure shows that while tethered for Neuropixel recording without a
% cable commutator, rats perform a cognitively demanding task at a level
% similar to when they are untethered
%
%=OPTIONAL INPUT
%
% from_scratch
% logical scalar indicating whether the data will be fetched from the
% Brody Lab SQL repository.
P_input = inputParser;
addParameter(P_input, 'from_scratch', false, @(x) isscalar(x) && islogical(x))
parse(P_input, varargin{:});
P_input = P_input.Results;
add_folders_to_path
if P_input.from_scratch
make_recording_sessions_table % a table indicating the dates of recording sessions
make_behavior_table % a table indicating dates of recording and also training sessions
analyze_performance_by_rat
end
P = get_parameters;
figure('Pos', [100, 50, 900, 1200])
k = 0;
n_col = 3;
n_row = 2;
ax_hdl = [];
k=k+1;
ax_hdl(k) = subplot(n_col, n_row,k);
plot_behavioral_comparison('trials_done', 'axes', gca, 'samp_size_pos', [0.1, 0.9]);
label_hdl(k)=label_panel(gca, P.panel_labels(k+1), 'FontSize', P.panel_label_font_size);
k=k+1;
ax_hdl(k) = subplot(n_col, n_row,k);
plot_behavioral_comparison('prct_correct', 'axes', gca);
label_hdl(k)=label_panel(gca, P.panel_labels(k+1), 'FontSize', P.panel_label_font_size);
k=k+1;
ax_hdl(k) = subplot(n_col, n_row,k);
plot_average_psychometrics('axes', gca);
label_hdl(k)=label_panel(gca, P.panel_labels(k+1), 'FontSize', P.panel_label_font_size);
label_hdl(k).Position(1)=label_hdl(k-2).Position(1);
k=k+1;
ax_hdl(k) = subplot(n_col, n_row,k);
plot_behavioral_comparison('sens', 'axes', gca);
label_hdl(k)=label_panel(gca, P.panel_labels(k+1), 'FontSize', P.panel_label_font_size);
label_hdl(k-1).Position(2)=label_hdl(k).Position(2);
k=k+1;
ax_hdl(k) = subplot(n_col, n_row,k);
plot_behavioral_comparison('abs_bias', 'axes', gca);
label_hdl(k)=label_panel(gca, P.panel_labels(k+1), 'FontSize', P.panel_label_font_size);
k=k+1;
ax_hdl(k) = subplot(n_col, n_row,k);
plot_behavioral_comparison('lapse', 'axes', gca);
label_hdl(k)=label_panel(gca, P.panel_labels(k+1), 'FontSize', P.panel_label_font_size);
for i = 1:numel(P.figure_image_format)
saveas(gcf, [P.plots_folder_path filesep 'figure6'], P.figure_image_format{i})
end