forked from dimme/cost2100model
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetFontsize.m
55 lines (49 loc) · 1.81 KB
/
setFontsize.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
%Copyright (C)2008 LIU Ling-Feng ,Université catholique de Louvain, Belgium
%This file is part of cost2100_model.
%cost2100_model is free software: you can redistribute it and/or modify
%it under the terms of the GNU General Public License as published by
%the Free Software Foundation, either version 3 of the License, or
%(at your option) any later version.
%cost2100_model is distributed in the hope that it will be useful,
%but WITHOUT ANY WARRANTY; without even the implied warranty of
%MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
%GNU General Public License for more details.
%You should have received a copy of the GNU General Public License
%along with cost2100_model. If not, see <http://www.gnu.org/licenses/>.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%A script to change the fontsize of every notation in a figure
FontSize = 24;
h = gcf;
c = findobj(gcf);
for n = 1:length(c),
try
set(c(n), 'FontSize', FontSize)
catch
end
% if strcmp( get(c(n),'Type'), 'axes' )
% set(get(c(2),'XLabel'), 'FontSize', FontSize)
% set(get(c(2),'YLabel'), 'FontSize', FontSize)
% set(get(c(2),'ZLabel'), 'FontSize', FontSize)
% set(get(c(2),'Title'), 'FontSize', FontSize)
% end
end
try
h = get(gca, 'title');
set(h, 'FontSize', FontSize)
h = get(gca, 'xlabel');
set(h, 'FontSize', FontSize)
h = get(gca, 'ylabel');
set(h, 'FontSize', FontSize)
h = get(gca, 'zlabel');
set(h, 'FontSize', FontSize)
catch
end
% set(fighandle,'paperpositionmode','auto')
% switch(filename(end-2:end))
% case 'jpg'
% print(h, '-djpeg', filename)
% case 'eps'
% print(h, '-depsc2', filename)
% otherwise
% error('unknown file format')
% end