-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain_tw_plot_summary.m
55 lines (40 loc) · 1.17 KB
/
main_tw_plot_summary.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
%%
%%
%%
clear;
addpath('./funcs');
addpath('./funcs2');
init_font;
targ_dirs = {'data/tw_healthy_adult', 'data/tw_healthy_infant', 'data/tw_schizophrenia', 'data/tw_dystonia'};
tick_labels = {'Adult', 'Infant', 'Schizophrenia', 'Dystonia'};
targ_cols = { [1 1 1]*0, [0 1 0]*0.7, [0 0 1]*0.7, [1 0 0]*0.7 };
targ_conc = 'ActiveAC';
xminmax = [0.5, 4.5];
fig = figure();
ax = plot_prep(fig, xminmax, [-20, 180], '(% Basal)', 0);
xticks([1:numel(targ_dirs)]);
yticks([0,60,120,180]);
xticklabels(tick_labels);
xtickangle(ax,60);
for i = 1:numel(targ_dirs);
load(sprintf('%s/maxconc_noDAdip_%s.mat', targ_dirs{i}, targ_conc)); % 'maxconc_noDAdip'
load(sprintf('%s/maxconcs_%s.mat', targ_dirs{i}, targ_conc)); % maxconcs
ref = bar(ax, i, 100 * (max(maxconcs) - maxconc_noDAdip) ./maxconc_noDAdip, 0.5 );
ref.FaceColor = targ_cols{i};
ref.EdgeColor = 'None';
end
%%
%% function
%%
function ax = plot_prep(fig, xx, yy, ytitle, ii)
col = floor(ii / 3);
row = mod(ii, 3);
ax = axes(fig, 'Position',[(0.38+col*0.3), 0.7-0.3*row, 0.225, 0.2]); %%
ax.ActivePositionProperty = 'Position';
box off;
set(ax,'TickDir','out');
hold on;
ylabel( ytitle );
xlim(xx);
ylim(yy);
end