Code covered by the BSD License  

Highlights from
tmark.m

image thumbnail
from tmark.m by J. Caspar
Annotation class which generates peak marks that are automatically updated when axes are rescaled.

tmulti(varargin)
function hdl = tmulti(varargin)
%TMULTI      Add multiple tmarks to a plot or plots
%
%All varargin are passed directly to tmark
%
%Inputs
%======
%   None
%
%Optional Inputs
%===============
%   varargin ............... All optional arguments are passed directly to
%                            tmark.
%Outputs
%=======
%   hdl .................... Handles to tmarks
%
%See also:  tmark   tedit  tfind    trestore

% $Author: jcaspar $
% $Date: 2009/11/06 20:04:09 $
% $Revision: 1.2 $

hdl = [];

b = 1;
k = 0;
while b == 1
    [x,y,b] = ginput(1);
    if b ~= 1
        break
    end
    k = k + 1;
    hdl{k} = tmark([x,y],varargin{:});
end

Contact us at files@mathworks.com