streamer.m
author A.M. Thurnherr <athurnherr@yahoo.com>
Tue, 29 Jun 2021 09:14:43 -0400
changeset 23 e83393696a24
parent 0 0a450563f904
permissions -rw-r--r--
IX_14 Release Version

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);