function str = maketip(this,tip,info)
%MAKETIP  Build data tips for @histview curves.
%
%   INFO is a structure built dynamically by the data tip interface
%   and passed to MAKETIP to facilitate construction of the tip text.

%   Author(s):  
%   Copyright 1986-2002 The MathWorks, Inc. 
%   $Revision: 1.1.6.1 $  $Date: 2004/12/26 21:38:54 $

r = info.Carrier;
AxGrid = info.View.AxesGrid;

% Create tip text
if length(r.RowIndex)>1
    str{1,1} = sprintf('Time series: %s Column: %d',r.Name,info.Row);
else
    str{1,1} = sprintf('Time series: %s',r.Name);
end

str{end+1,1} = sprintf('Count: %0.3g',tip.Position(2));
[junk,I] = min(abs(tip.Position(1)-info.Data.XData));
if I==1
    width = (info.Data.XData(2)-info.Data.XData(1))/2;
else
    width = (info.Data.XData(I)-info.Data.XData(I-1))/2;
end
str{end+1,1} = sprintf('Range: %0.3g - %0.3g',info.Data.XData(I)-width, ...
    info.Data.XData(I)+width);