-
Notifications
You must be signed in to change notification settings - Fork 0
/
Visualize.m
28 lines (23 loc) · 900 Bytes
/
Visualize.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
% ========================================================================================
% Filename: Visualize.m
% Author: Rolfe Power
% ========================================================================================
%% Constants
DATA_FILE_NAME = "output.csv";
%% Load Data
if ~isfile(DATA_FILE_NAME)
error("Cannot find file %s", DATA_FILE_NAME);
end
data = readtable(DATA_FILE_NAME, "Delimiter", ",", "ReadVariableNames", true);
%% Content Type Histogram
figure()
histogram(categorical(data.content_group), "DisplayOrder", "ascend");
set(gca, "FontSize", 16, "ticklabelinterpreter", "Latex")
ylabel("Count", "FontSize", 16, "interpreter", "Latex");
grid on
%% Content Type Pie Chart
figure()
tps = string(data.content_group);
tps(tps ~= "pdf" & tps ~= "powerpoint" & tps ~= "video") = "other";
t = pie(categorical(tps));
set(gca, "FontSize", 16, "TickLabelInterpreter", "Latex");