-
Notifications
You must be signed in to change notification settings - Fork 0
/
plotlatex.m
32 lines (26 loc) · 836 Bytes
/
plotlatex.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
function plotlatex(fig, titulo, textxlab, textylab)
grid on
% define figure properties
opts.Colors = get(groot,'defaultAxesColorOrder');
opts.saveFolder = 'img/';
opts.width = 20;
opts.height = 10;
opts.fontType = 'Times';
opts.fontSize = 24.6;
% add axis labes and legend
axis tight
title(titulo)
xlabel(textxlab)
ylabel(textylab)
%legend('1960','1946','1970','1972','1975')
% scaling
fig.Units = 'centimeters';
fig.Position(3) = opts.width;
fig.Position(4) = opts.height;
% set text properties
set(fig.Children, ...
'FontName', 'Times', ...
'FontSize', 23);
% remove unnecessary white space
set(gca,'LooseInset',max(get(gca,'TightInset'), 0.02))
end