function ticks = best_ticks(var_range)
% ticks = best_ticks(var_range)
%
% return something reasonable for tick locations given data range


% Ticks on colorbar every 10 or 20 units:
l10r = log10(diff(var_range)); 
l10int = floor(l10r); l10m = mod(l10r, 1);

if l10m > log10(5), 
   ttt = 10;
elseif l10m > log10(2), 
   ttt = 5;
else 
   ttt = 2;
end

tl = ttt * 10^(l10int-1);
ticks = (tl*ceil(var_range(1)/tl)) : tl :  (tl*floor(var_range(2)/tl));

