-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplotScript.m
More file actions
50 lines (34 loc) · 979 Bytes
/
plotScript.m
File metadata and controls
50 lines (34 loc) · 979 Bytes
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
clear
close all
[ fileName, folderPath] = uigetfile("*.mat");
filePath = fullfile( folderPath, fileName);
result = load( filePath );
result = result.ismoeObject;
xStar = result.X( 1, :);
yStar = result.Y( :, 1);
minY = min( yStar );
maxY = max( yStar );
[ nY, nX] = size( result.X );
[ highDensityMatrix, medianEstimate] = computeHighDensityArea( result, nX, nY);
figure();
hold on
hData = plot( result.data.x, result.data.y, '.');
hData.MarkerSize = 65;
h = imagesc( xStar, yStar, highDensityMatrix);
cmap = flipud( gray );
colormap( cmap );
h = plot( xStar, medianEstimate);
h.Color = [ 51, 51, 51] / 255;
h.LineWidth = 10;
hData = plot( result.data.x, result.data.y, '.', 'Color', hData.Color);
hData.MarkerSize = 65;
ylim([ minY, maxY]);
h = xlabel("$x$");
h.Interpreter = "latex";
h = ylabel("$y$");
h.Interpreter = "latex";
ax = gca();
ax.Layer = "top";
ax.YDir = "normal";
ax.FontSize = 55;
caxis([0, 4]);