-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_MergedGrains.m
More file actions
33 lines (29 loc) · 1.21 KB
/
Copy pathplot_MergedGrains.m
File metadata and controls
33 lines (29 loc) · 1.21 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
function plot_MergedGrains(grainsVar, mergedGrains, twinBoundary)
% Plot twin boundaries and merged grains
imgSampPath = evalin('base', 'imgSampPath');
samp_name = evalin('base', 'samp_name');
methodName = evalin('base', 'methodName');
phaseName = evalin('base', 'phaseName');
if length(grainsVar.mineralList) > 1
grainsVar = grainsVar(phaseName);
end
% Twin boundaries over grains
figure;
plot(grainsVar, grainsVar.meanOrientation)
hold on
plot(twinBoundary, 'linecolor', 'w', 'linewidth', 1, 'displayName', 'twin boundary')
hold off
export_fig(char(fullfile(imgSampPath, sprintf('%s_twinsOverGrains_%s.png', samp_name, methodName))), '-m2');
close
% Twin boundaries and merged grain boundaries
figure;
plot(grainsVar, grainsVar.meanOrientation)
hold on
plot(twinBoundary, 'linecolor', 'w', 'linewidth', 2, 'linestyle', '-', ...
'displayName', 'twin boundary')
plot(mergedGrains.boundary, 'linecolor', 'k', 'linewidth', 2, 'linestyle', '-', ...
'displayName', 'merged grains')
hold off
export_fig(char(fullfile(imgSampPath, sprintf('%s_twins_mergedGBs_%s.png', samp_name, methodName))), '-m2');
close
end