forked from PPuranen/Electrolyzer-modelling-toolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetFigProp.m
48 lines (40 loc) · 1.54 KB
/
setFigProp.m
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
function setFigProp()
%SetFigProp Define the default figure properties suitable for
%publications
%% Set units
Units = 'centimeters';
set(groot,'defaultFigureUnits',Units);
%% Monitor size
set(0,'units',Units)
screenSize = get(0,'ScreenSize'); % Screen size [~ ~ width height]
% Figure size and position
FigSizeWidth = 9;%8.5 %IEEE 3.5in ~ 8.89cm Elsevier 9cm
% %https://journals.ieeeauthorcenter.ieee.org/create-your-ieee-journal-article/create-graphics-for-your-article/accepted-graphics-file-formats/
FigSizeHeight = 7; % One plot
FigPosLeft = 0;
FigPosBottom = 0;
set(groot,'defaultFigurePosition',[FigPosLeft FigPosBottom FigSizeWidth FigSizeHeight]);
f = figure;
pause(0.1); % The system needs time to open the figure properly to obtain the true OuterPosition...
outPos = get(f,'OuterPosition');
close(f);
FigPosLeft = FigPosLeft-outPos(1);
FigPosBottom = screenSize(4)-outPos(4);
set(groot,'defaultFigurePosition',[FigPosLeft FigPosBottom FigSizeWidth FigSizeHeight]);
%% Figure parameters
FontSize = 8;
FontName = 'Times New Roman';
LineWidth = 1;
Location = 'SouthWest';
GridLineStyle = ':';
set(groot,'defaultAxesFontName', FontName);
set(groot,'defaultAxesFontSize', FontSize);
set(groot,'defaultAxesGridLineStyle', GridLineStyle);
set(groot,'defaultFigureColor', 'w');
set(groot,'defaultAxesFontName', FontName);
set(groot,'defaultAxesFontSize', FontSize);
% set(groot,'LegendInterpreter', 'latex');
set(groot,'defaultTextInterpreter','latex');
set(groot,'defaultLegendInterpreter','latex');
set(groot,'defaultAxesTickLabelInterpreter','latex');
end