/usr/share/freemat/toolbox/graph/title.m is in freemat-data 4.0-5build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 50 51 52 53 54 55 56 57 58 | % TITLE TITLE Plot Title Function
%
% Usage
%
% This command adds a title to the plot. The general syntax
% for its use is
%
% title('label')
%
% or in the alternate form
%
% title 'label'
%
% or simply
%
% title label
%
% Here label is a string variable. You can also specify
% properties for the label, and a handle to serve as a target
% for the operation
%
% title(handle,'label',properties...)
%
% Copyright (c) 2002-2006 Samit Basu
% Licensed under the GPL
function o = title(varargin)
% Check for an axes handle
if (nargin>=2)
if (isnumeric(varargin{1}) && (length(varargin{1})==1) && ...
ishandle(varargin{1},'axes'))
handle = varargin{1}(1);
varargin(1) = [];
nargin = nargin - 1;
else
handle = gca;
end
else
handle = gca;
end
saveca = gca;
axes(handle);
if (length(varargin) == 0)
error('must specify title text');
end
if (nargout > 1)
error('title outputs at most one argument')
end
mtext = varargin{1};
varargin(1) = [];
nargin = nargin - 1;
o1 = htext('string',mtext,'horiz','center','vert','top','position',[0.5,1,0],'parent',handle,'autoparent','off',varargin{:});
set(handle,'title',o1);
axes(saveca);
if (nargout == 1)
o = o1;
end
|