Debian Codegraph @

contrib/ms-sbvar/TZcode/MatlabFiles/subtitle.m

raw
1 function [ax,h]=subtitle(text)
2 %
3 %Centers a title over a group of subplots.
4 %Returns a handle to the title and the handle to an axis.
5 % [ax,h]=subtitle(text)
6 % returns handles to both the axis and the title.
7 % ax=subtitle(text)
8 % returns a handle to the axis only.
9 %
10 % Copyright (C) 1997-2012 Tao Zha
11 %
12 % This free software: you can redistribute it and/or modify
13 % it under the terms of the GNU General Public License as published by
14 % the Free Software Foundation, either version 3 of the License, or
15 % (at your option) any later version.
16 %
17 % It is distributed in the hope that it will be useful,
18 % but WITHOUT ANY WARRANTY; without even the implied warranty of
19 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 % GNU General Public License for more details.
21 %
22 % If you did not received a copy of the GNU General Public License
23 % with this software, see <http://www.gnu.org/licenses/>.
24 %
25
26
27 % ax=axes('Units','Normal','Position',[.05 .05 .9 .9],'Visible','off','FontSize',14,'FontWeight','Bold');
28 ax=axes('Units','Normal','Position',[.05 .05 .9 .9],'Visible','off','FontSize',10,'FontWeight','Bold','FontName','Times New Roman');
29 % ax=axes('Units','Normal','Position',[.075 .075 .85 .85],'Visible','off');
30 set(get(ax,'Title'),'Visible','on')
31 title(text);
32 if (nargout < 2)
33 return
34 end
35 h=get(ax,'Title');
36
37 %%%END CODE%%%