-
Notifications
You must be signed in to change notification settings - Fork 0
/
FullFigureData.m
94 lines (91 loc) · 4.06 KB
/
FullFigureData.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
classdef FullFigureData
properties
AxesList; % All the axes
ClusterXList; % All the Cluster x data, across axes, in the same
% order as the axes are listed
ClusterYList;
ClusterColorList;
ClusterAlphaList;
SilhouetteFaceList;
SilhouetteVertexList;
SilhouetteColorList;
SilhouetteAlphaList;
PerceptualTrajectoryXList;
PerceptualTrajectoryYList;
PerceptualTrajectoryColorList;
ResultXList;
ResultYList;
ResultColorList;
JunctureSizes;
ResultPointSizes;
end
methods
function obj = FullFigureData(axesList, clusterXList, ...
clusterYList, clusterColorList, clusterAlphaList, ...
silhouetteFaceList, silhouetteVertexList, ...
silhouetteColorList, silhouetteAlphaList, ...
trajectoryXList, trajectoryYList, trajectoryColorList, ...
resultXList, resultYList, resultColorList, ...
junctureSizes, resultPointSizes)
obj.AxesList = axesList;
obj.ClusterXList = clusterXList;
obj.ClusterYList = clusterYList;
obj.ClusterColorList = clusterColorList;
obj.ClusterAlphaList = clusterAlphaList;
obj.SilhouetteFaceList = silhouetteFaceList;
obj.SilhouetteVertexList = silhouetteVertexList;
obj.SilhouetteColorList = silhouetteColorList;
obj.SilhouetteAlphaList = silhouetteAlphaList;
obj.PerceptualTrajectoryXList = trajectoryXList;
obj.PerceptualTrajectoryYList = trajectoryYList;
obj.PerceptualTrajectoryColorList = trajectoryColorList;
obj.ResultXList = resultXList;
obj.ResultYList = resultYList;
obj.ResultColorList = resultColorList;
obj.JunctureSizes = junctureSizes;
obj.ResultPointSizes = resultPointSizes;
end
function PlotFigures(obj)
% For each axes, plot the appropriate things -- clusters first,
% then silhouette, then perceptual trajectory, then result
for ax = 1:length(obj.AxesList)
CurrentAxes = obj.AxesList{ax,1};
hold(CurrentAxes, "on");
end
for n = 1:length(obj.AxesList)
% Clusters
if ~isempty(obj.ClusterXList{n})
scatter(obj.AxesList{n}, obj.ClusterXList{n}, ...
obj.ClusterYList{n}, obj.JunctureSizes, ...
obj.ClusterColorList{n}, "filled", ...
"MarkerFaceAlpha", "flat", ...
"MarkerEdgeAlpha", "flat", ...
"AlphaDataMapping", "none", ...
"AlphaData", obj.ClusterAlphaList{n});
end
% Silhouette
if ~isempty(obj.SilhouetteFaceList{n})
patch(obj.AxesList{n}, "Faces", ...
obj.SilhouetteFaceList{n}, "Vertices", ...
obj.SilhouetteVertexList{n}, "FaceVertexCData", ...
obj.SilhouetteColorList{n}, ...
"FaceColor", "flat", "EdgeColor", "none", ...
"FaceVertexAlphaData", obj.SilhouetteAlphaList{n}, ...
"FaceAlpha", "flat", "AlphaDataMapping", "none");
end
% PerceptualTrajectory
if ~isempty(obj.PerceptualTrajectoryXList{n})
scatter(obj.AxesList{n}, obj.PerceptualTrajectoryXList{n}, ...
obj.PerceptualTrajectoryYList{n}, obj.ResultPointSizes, ...
obj.PerceptualTrajectoryColorList{n}, "filled");
end
% Results
if ~isempty(obj.ResultXList{n})
scatter(obj.AxesList{n}, obj.ResultXList{n}, ...
obj.ResultYList{n}, obj.ResultPointSizes, ...
obj.ResultColorList{n}, "filled");
end
end
end
end
end