-
Notifications
You must be signed in to change notification settings - Fork 1
/
IEEEFigure.m
62 lines (44 loc) · 1.99 KB
/
IEEEFigure.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
%% IEEE Standard Figure Configuration - Version 1.0
% run this code before the plot command
%%
% According to the standard of IEEE Transactions and Journals:
% Times New Roman is the suggested font in labels.
% For a singlepart figure, labels should be in 8 to 10 points,
% whereas for a multipart figure, labels should be in 8 points.
% Width: column width: 8.8 cm; page width: 18.1 cm.
%% width & hight of the figure
k_scaling = 4; % scaling factor of the figure
% (You need to plot a figure which has a width of (8.8 * k_scaling)
% in MATLAB, so that when you paste it into your paper, the width will be
% scalled down to 8.8 cm which can guarantee a preferred clearness.
k_width_hight = 2; % width:hight ratio of the figure
width = 8.8 * k_scaling;
hight = width / k_width_hight;
%% figure margins
top = 0.5; % normalized top margin
bottom = 3; % normalized bottom margin
left = 3.5; % normalized left margin
right = 1; % normalized right margin
%% set default figure configurations
set(0,'defaultFigureUnits','centimeters');
set(0,'defaultFigurePosition',[0 0 width hight]);
set(0,'defaultLineLineWidth',0.25*k_scaling);
set(0,'defaultAxesLineWidth',0.25*k_scaling);
set(0,'defaultAxesGridLineStyle',':');
set(0,'defaultAxesYGrid','on');
set(0,'defaultAxesXGrid','on');
set(0,'defaultAxesFontName','Times New Roman');
set(0,'defaultAxesFontSize',6*k_scaling);
set(0,'defaultTextFontName','Times New Roman');
set(0,'defaultTextFontSize',6*k_scaling);
set(0,'defaultLegendFontName','Times New Roman');
set(0,'defaultLegendFontSize',6*k_scaling);
set(0,'defaultAxesUnits','normalized');
set(0,'defaultAxesPosition',[left/width bottom/hight (width-left-right)/width (hight-bottom-top)/hight]);
% set(0,'defaultAxesColorOrder',[0 0 0]);
set(0,'defaultAxesTickDir','out');
set(0,'defaultFigurePaperPositionMode','auto');
% you can change the Legend Location to whatever as you wish
set(0,'defaultLegendLocation','southeast');
set(0,'defaultLegendBox','on');
set(0,'defaultLegendOrientation','vertical');