Line | |
---|
1 | %FONT_SIZE Set large graphic font |
---|
2 | % |
---|
3 | % font_size(size) |
---|
4 | % |
---|
5 | % Set font size for current figure |
---|
6 | |
---|
7 | function font_size(size) |
---|
8 | |
---|
9 | V = axis; |
---|
10 | H = get(gcf,'Children'); |
---|
11 | c1 = []; |
---|
12 | for h = H' |
---|
13 | if strcmp(get(h,'type'),'axes') |
---|
14 | set(get(h,'XLabel'), 'FontSize', size); |
---|
15 | set(get(h,'YLabel'), 'FontSize', size); |
---|
16 | set(get(h,'Title'), 'FontSize', size); |
---|
17 | set(h, 'FontSize', size); |
---|
18 | c1 = [c1; get(gca, 'Children')]; |
---|
19 | end |
---|
20 | end |
---|
21 | axis(V); |
---|
22 | for h1 = c1' |
---|
23 | v1 = get (h1); |
---|
24 | if (isfield (v1, 'FontSize')) |
---|
25 | set (h1, 'FontSize', size); |
---|
26 | end; |
---|
27 | c2 = get (h1, 'Children'); |
---|
28 | for h2 = c2' |
---|
29 | v2 = get (h2); |
---|
30 | if (isfield (v2, 'FontSize')) |
---|
31 | set (h2, 'FontSize', size); |
---|
32 | end; |
---|
33 | end; |
---|
34 | end; |
---|
35 | |
---|
36 | return |
---|
37 | |
---|
Note: See
TracBrowser
for help on using the repository browser.