forked from helgestein/htAx
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcallbackPlotTernPhase.m
More file actions
37 lines (29 loc) · 1.06 KB
/
Copy pathcallbackPlotTernPhase.m
File metadata and controls
37 lines (29 loc) · 1.06 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
function callbackPlotTernPhase(obj, evt, ternHandles, specHandles)
%CALLBACKPLOTTERNPHASE plots the user-selected points on a ternary diagram
figTern = ternHandles.fTernDiagram;
ternInfo = figTern.UserData;
pointInfo = ternInfo.pointInfo;
fSpecPlot = specHandles.fSpecPlot;
specInfo = fSpecPlot.UserData;
if ishandle(ternInfo.fTernPhase) == 1
figure(ternInfo.fTernPhase);
clf;
else
ternInfo.fTernPhase = figure;
set(gcf, 'color', 'w');
set(gcf, 'Name', 'Ternary Phase Plot');
end
axesTernPhase = axes(...
'Units', 'Normalized', ...
'Position', [0.1 0.1 0.8 0.8]);
plotTernBase(axesTernPhase, ternInfo.labels);
hold on;
for i = 1:ternInfo.numSelected
angle = specInfo.XRDData(pointInfo(i, 6), 1);
colorSelection = getColorSelection(angle, specInfo.minAngle, ...
specInfo.maxAngle);
hold on;
scatter(axesTernPhase, pointInfo(i, 1), pointInfo(i, 2), ...
30, colorSelection, 'filled');
end
end