IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
format_frank.m
Go to the documentation of this file.
1 %>@ingroup graphicsapi
2 %>@file
3 %>@brief Formats a figure according to Frank's rules (Times New Roman)
4 %
5 %> @param F =gcf()
6 %> @param scale =1 Obsolete. Uses global SCALE now
7 %> @param handles other handles to be formatted as well (that wouldn't be automatically picked)
8 function format_frank(F, scale, handles)
9 fig_assert();
10 global FONT FONTSIZE SCALE;
11 
12 if ~exist('F', 'var') || isempty(F)
13  F = gcf();
14 end;
15 
16 if isempty(FONT)
17  font = 'Times';
18  irwarning('FONT global not present, using default ''Times''.');
19 else
20  font = FONT;
21 end;
22 if isempty(FONTSIZE)
23  fontsize = 36;
24  irwarning('FONTSIZE global not present, using default 36.');
25 else
26  fontsize = FONTSIZE;
27 end;
28 
29 
30 
31 a = gca(); %get(F, 'CurrentAxes');
32 l1 = get(a, 'Xlabel');
33 l2 = get(a, 'Ylabel');
34 l3 = get(a, 'Zlabel');
35 t = get(a, 'Title');
36 
37 if ~exist('handles', 'var')
38  handles = [];
39 end;
40 handles = cat(2, handles, [a, l1, l2, l3, t]);
41 
42 for i = 1:length(handles)
43  o = handles(i);
44 % set(o, 'FontName', 'Times New Roman');
45  set(o, 'FontName', font);
46  set(o, 'FontSize', fontsize*SCALE);
47  set(o, 'LineWidth', scaled(2));
48 end;
49 
50 set(a, 'Box', 'on');
51 set(a, 'LineWidth', scaled(2));
function scaled(in i)
function format_frank(in F, in scale, in handles)
function fig_assert()
function irwarning(in s)