Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DCT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
graintracking
DCT
Commits
d97e1347
Commit
d97e1347
authored
7 years ago
by
Nicola Vigano
Browse files
Options
Downloads
Patches
Plain Diff
Figures: more fixes for EBSD and figure sizes
Signed-off-by:
Nicola Vigano
<
nicola.vigano@esrf.fr
>
parent
4a253802
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
zUtil_Drawing/gtFigureCreateEBSDMapIPF.m
+12
-1
12 additions, 1 deletion
zUtil_Drawing/gtFigureCreateEBSDMapIPF.m
zUtil_Drawing/gtFigureSetSize.m
+6
-5
6 additions, 5 deletions
zUtil_Drawing/gtFigureSetSize.m
with
18 additions
and
6 deletions
zUtil_Drawing/gtFigureCreateEBSDMapIPF.m
+
12
−
1
View file @
d97e1347
...
...
@@ -27,6 +27,7 @@ function gtFigureCreateEBSDMapIPF(EBSD_struct, varargin)
'pixel_to_cm'
,
0.05
,
...
'borders'
,
false
,
...
'colorbar'
,
false
,
...
'filename'
,
[],
...
'extras'
,
[]
);
conf
=
parse_pv_pairs
(
conf
,
varargin
);
...
...
@@ -111,12 +112,22 @@ function gtFigureCreateEBSDMapIPF(EBSD_struct, varargin)
imagesc
(
final_slice_RGB
,
'Parent'
,
ax
);
if
(
~
isempty
(
conf
.
extras
))
if
(
~
isempty
(
conf
.
scale
))
pix_size
=
EBSD_struct
.
pixel_size
.
/
conf
.
scale
;
else
pix_size
=
EBSD_struct
.
pixel_size
;
end
im_props
=
struct
(
...
'pixel_size'
,
EBSD_struct
.
pix
el
_size
,
...
'pixel_size'
,
pix_size
,
...
'size'
,
img_size
);
gtFigureAddExtras
(
ax
,
im_props
,
conf
.
extras
);
end
set
(
ax
,
'xtick'
,
[])
set
(
ax
,
'xticklabel'
,
[])
set
(
ax
,
'ytick'
,
[])
set
(
ax
,
'yticklabel'
,
[])
gtFigureSetSize
(
f
,
ax
,
conf
,
img_size
)
if
(
~
isempty
(
conf
.
filename
))
...
...
This diff is collapsed.
Click to expand it.
zUtil_Drawing/gtFigureSetSize.m
+
6
−
5
View file @
d97e1347
function gtFigureSetSize(f, ax, conf, img_size)
if (exist('img_size', 'var')
&&
~isempty(img_size))
img_size = img_size * conf.pixel_to_cm;
img_size = img_size
.
* conf.pixel_to_cm;
else
img_size = conf.figure_size;
end
...
...
@@ -8,9 +8,9 @@ function gtFigureSetSize(f, ax, conf, img_size)
set(f, 'Units', 'centimeters')
if (~conf.borders)
if (~conf.colorbar)
figure_position = [
0
,
0
, img_size];
figure_position = [
1
,
1
, img_size];
else
figure_position = [
0
,
0
, img_size] + [0, 0, 3, 1];
figure_position = [
1
,
1
, img_size] + [0, 0, 3, 1];
end
set(f, 'Position', figure_position)
set(f, 'Paperposition', figure_position)
...
...
@@ -46,11 +46,11 @@ function gtFigureSetSize(f, ax, conf, img_size)
set(ax, 'Units', 'centimeters')
if (~conf.colorbar)
figure_position = [
0
,
0
, img_size] + [0, 0, 2, size_padding];
figure_position = [
1
,
1
, img_size] + [0, 0, 2, size_padding];
set(f, 'Position', figure_position)
set(f, 'Paperposition', figure_position)
else
figure_position = [
0
,
0
, img_size] + [0, 0, 3.5, size_padding+0.5];
figure_position = [
1
,
1
, img_size] + [0, 0, 3.5, size_padding+0.5];
set(f, 'Position', figure_position)
set(f, 'Paperposition', figure_position)
...
...
@@ -74,4 +74,5 @@ function gtFigureSetSize(f, ax, conf, img_size)
box(ax, 'Off')
grid(ax, 'Off')
fprintf('Figure size: [%g, %g] cm\n', figure_position(3:4))
drawnow();
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment