-
Notifications
You must be signed in to change notification settings - Fork 1
/
streamer.m
49 lines (45 loc) · 1.12 KB
/
streamer.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
function handle = streamer(fig,TitleString)
% STREAMER Titles for an entire figure.
% STREAMER('text') adds text at the top of the current figure,
% going across subplots.
% STREAMER(fig,'text') adds it to the specified figure.
%
% changed default to fontsize 14 and fontweight bold GK
%
% See also XLABEL, YLABEL, ZLABEL, TEXT, TITLE.
%
% Keith Rogers 11/30/93
% Copyright (c) by Keith Rogers 1995
%
% Mods:
% 11/94 adapted to 4.2
% 06/95 clean up, added alternate figure option.
if(nargin<2)
TitleString = fig;
fig = gcf;
end
ax = gca;
sibs = get(fig, 'Children');
for i = 1:max(size(sibs))
if(strcmp(get(sibs(i),'Type'),'axes'))
if(strcmp(get(sibs(i),'Tag'),'Streamer'))
StreamerHand = sibs(i);
end
end
end
if (exist('StreamerHand')~=2)
figure(fig);
StreamerHand = axes('Units','normalized',...
'Position',[.1 .9 .8 .05],...
'Box','off',...
'Visible','off',...
'Tag','Streamer');
handle = get(gca,'Title');
set(handle,'Visible','On');
else
handle = get(gca,'Title');
axes(StreamerHand);
end
title(TitleString);
axes(ax);
set(handle,'fontweight','bold','fontsize',16);