Skip to content
Snippets Groups Projects
Commit 7dd31367 authored by Laura Nervo's avatar Laura Nervo Committed by Nicola Vigano
Browse files

gtDrawGrainUnitCells : added options 'strainT' and 'zoom' in varargin


Signed-off-by: default avatarLaura Nervo <laura.nervo@esrf.fr>
parent 23744d9e
No related branches found
No related tags found
No related merge requests found
...@@ -55,6 +55,8 @@ app.view = [0 90]; ...@@ -55,6 +55,8 @@ app.view = [0 90];
app.showbar = false; app.showbar = false;
app.colormap = 'cool'; app.colormap = 'cool';
app.strain = 0; app.strain = 0;
app.strainT = [3 3];
app.zoom = 'off';
app = parse_pv_pairs(app, varargin); app = parse_pv_pairs(app, varargin);
...@@ -69,7 +71,7 @@ if isempty(app.grainids) ...@@ -69,7 +71,7 @@ if isempty(app.grainids)
end end
if isempty(app.cmap) if isempty(app.cmap)
if isfield(grains{1},'strain') if isfield(grains{1},'strain')
app.cmap = gtIndexAllGrainValues(grains,'strain','strainT',3,3); app.cmap = gtIndexAllGrainValues(grains,'strain','strainT',app.strainT(1),app.strainT(2));
disp('Using strainT(3,3) as colorscale') disp('Using strainT(3,3) as colorscale')
app.showbar = true; app.showbar = true;
else else
...@@ -114,7 +116,6 @@ else ...@@ -114,7 +116,6 @@ else
end end
hold on hold on
view(app.view);
nof_grains = length(grains); nof_grains = length(grains);
...@@ -146,7 +147,7 @@ elseif strcmpi(app.type, 'hexagonal') ...@@ -146,7 +147,7 @@ elseif strcmpi(app.type, 'hexagonal')
end end
[Bmat, Amat] = gtCrystHKL2CartesianMatrix(app.latticepar); [Bmat, Amat] = gtCrystHKL2CartesianMatrix(app.latticepar);
pl_cryst = gtCrystHKL2Cartesian(hkl, Bmat); % hkl plane normals in cryst reference pl_norm = gtCrystHKL2Cartesian(hkl, Bmat); % hkl plane normals in cryst reference
% draw unit cells % draw unit cells
...@@ -161,6 +162,10 @@ for ii = 1:nof_grains ...@@ -161,6 +162,10 @@ for ii = 1:nof_grains
end end
axis equal; axis equal;
zoom('out');
zoom(app.zoom)
zoom('off')
view(app.view);
f_handle = gcf; f_handle = gcf;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment