-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsurvey_seedb_eg.m
74 lines (68 loc) · 2.08 KB
/
survey_seedb_eg.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
65
66
67
68
69
70
71
72
73
74
clear; close all;
% Output from survey.py
% Answer.Alien , 2 , Answer.StartupOrCorporation , Answer.Sudoku , 2 , 0.4400874372419771
% refer_view Answer.StartupOrCorporation, aggr
% ['1', 21]
% ['2', 18]
%
% target_view Answer.StartupOrCorporation, aggr
% ['1', 5]
% ['2', 17]
% refer_stats = normalize([21; 18]);
% target_stats = normalize([5; 17]);
% n_bars = size(refer_stats, 1);
%
% y_groups = [target_stats, refer_stats];
%
% hold on;
% xticks = 1:n_bars;
% bar(xticks, y_groups);
% ax = gca; % necessary
% ax.XTick = xticks;
% ax.XTickLabel = {'Startup', 'Corporation'};
% ax.FontSize = 18;
% xlabel('Workplace preference');
% ylabel('% Sudoku-unable');
% legend({'Target filter: Disbelief in alien existence'; 'Reference filter: Any'}, 'location', 'SouthOutside');
% hold off;
% Answer.Alien , 1 , Answer.StartupOrCorporation , Answer.Potato , 2 , 0.40406101782088427
% refer_view Answer.StartupOrCorporation, aggr
% ['2', 6]
% ['1', 15]
%
% target_view Answer.StartupOrCorporation, aggr
% ['2', 0]
% ['1', 12]
%
% Answer.Alien , 2 , Answer.StartupOrCorporation , Answer.Potato , 2 , 0.538748023761179
% target_view Answer.StartupOrCorporation, aggr
% ['2', 6]
% ['1', 3]
%
% Answer.HairDrying , 2 , Answer.StartupOrCorporation , Answer.Potato , 2 , 0.30304576336566325
% target_view Answer.StartupOrCorporation, aggr
% ['2', 2]
% ['1', 2]
refer = normalize([15, 6]);
target_alien1 = normalize([12, 0]);
target_alien2 = normalize([3, 6]);
target_hairdry2 = normalize([2, 2]);
n_bars = size(refer, 2);
ys = [refer; target_alien1; target_alien2; target_hairdry2];
xls = {'Filter: All', 'Filter: Belief in Alien Existence', 'Filter: Disbelief in Alien Existence', 'Filter: Prefer Blow Hair Drying'};
for i = 1:size(ys, 1)
fh = figure;
fh.Position = [0, 0, 520, 280];
hold on;
xticks = 1:n_bars;
bar_width = 0.7;
bar(xticks, ys(i, :), bar_width);
ax = gca; % necessary
ax.XTick = xticks;
ax.XTickLabel = {'Startup', 'Corporation'};
ax.FontSize = 20;
xlabel(xls(i));
ylabel('% Cheddar & Sour Cream');
title('Potato Chips vs Workspace Preference');
hold off;
end