function plotbot(plotnum, r, btmask, titlestr);
%  plotbot(plotnum, r, btmask, titlestr);
% called by prepedit.m and avg.m (if showverbose)


if length(unique(btmask)) > 1
   bbb.x = [1:length(r.dday)];
   bbb.y = [1:length(r.depth)]';
   bbb.z = btmask;
   
   ccc.fn = 'z'; ccc.ord_name = 'y'; ccc.abc_name = 'x';
   cfg=aplotit(bbb,ccc,'cur_ax', subplot(3,2,plotnum), 'var_range', [0 1]);
   hold on
else
   subplot(3,2,plotnum)
   plot(btmask(:,1), r.depth);ra(gca);
end
title(titlestr)