-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo1.m
More file actions
45 lines (41 loc) · 2.39 KB
/
demo1.m
File metadata and controls
45 lines (41 loc) · 2.39 KB
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
% Demo 1 : Basic usage
% Generate three Gaussian-distributed datasets
Data1 = mvnrnd([ 2, 3], [1, 0;0, 2], 300);
Data2 = mvnrnd([ 6, 7], [1, 0;0, 2], 300);
Data3 = mvnrnd([14, 9], [1, 0;0, 1], 300);
DataSet = {Data1, Data2, Data3};
% Create marginal plot object and draw
MP = marginalPlot(DataSet, 'MainType',6, 'UpperType',5, 'RightType',10);
MP.draw();
% =========================================================================
% MainType (Main Plot) Options
% =========================================================================
% No. | Type | Description
% -----|--------------|----------------------------------------------------
% 1 | 'scatter' | Scatter plot with filled markers
% 2 | 'contour' | Contour plot based on kernel density estimation
% 3 | 'pred' | Linear regression with prediction interval (polyfit)
% 4 | 'convhull' | Scatter plot with convex hull outline
% 5 | 'cover' | Scatter plot with buffered/expanded convex hull (rounded)
% 6 | 'ellipse' | Scatter plot with confidence ellipse (99%)
% 7 | 'centroid' | Star plot: points connected to group centroid
% 8 | 'errorbar' | Cross error bar (mean ± std) for each group
% 9 | 'conf' | Linear regression with confidence interval (fitlm)
% ---------------------------------------------------------------------------
% =========================================================================
% UpperType / RightType (Marginal Plot) Options
% =========================================================================
% No. | Type | Description
% -----|----------------|--------------------------------------------------
% 1 | 'hist' | Standard histogram
% 2 | 'kd-area' | Kernel density estimation area (filled)
% 3 | 'kd-line' | Kernel density estimation line only
% 4 | 'kd-both' | Kernel density area + line
% 5 | 'kd-hist' | Histogram overlayed with kernel density line
% 6 | 'box' | Box plot (median, quartiles, outliers)
% 7 | 'violin' | Full violin plot (symmetric KDE)
% 8 | 'rug' | Rug plot (vertical/horizontal line scatter)
% 9 | 'joyplot' | Joyplot / Ridgeline plot (stacked KDE)
% 10 | 'half-violin' | Half violin plot (right side only, compact)
% 11 | 'raincloud' | Raincloud plot (half-violin + scatter)
% -------------------------------------------------------------------------