function adcpcal2(calr, label, igood, j_t, j_ph, j_amp, j_dt);

% 98/01/28 replaced "pause" with "paused" Jules

% --> Time series of raw amp and phase
orient tall
clf
axes('position',[.2 .75 .65 .17])
plot(calr(:, j_t), calr(:, j_ph), 'o')
xlabel('days')
ylabel('phase')
[m n] = size(calr);
title([label, ' unedited, npts = ' int2str(m)])
grid
axes('position',[.2 .53 .65 .17])
plot(calr(:, j_t), calr(:, j_amp), '+')
set(gca, xtl_str, [''])
ylabel('amplitude')
grid

% --> Time series of edited amp and phase: save
axes('position',[.2 .31 .65 .17])
   plot(calr(igood, j_t), calr(igood, j_ph), 'o')
   xlabel('days')
   ylabel('phase')
   title([label, ' edited, npts = ' int2str(length(igood))])
   grid
axes('position',[.2 .09 .65 .17])
   plot(calr(igood, j_t), calr(igood, j_amp), '+')
   set(gca, xtl_str, [''])
   ylabel('amplitude')
   text(-0.25, -0.35, pctime, 'units', 'normalized', 'rotation', 90.0);
   grid
print -append cal.ps
paused

% --> Histograms of edited amp and phase: save
clf
axes('position',[.2 .75 .65 .17])
   hist(calr(igood,j_ph), 20)
   title([label, ' edited, npts = ' int2str(length(igood))])
   xlabel('phase')
   set(gca, 'ygrid', 'on')
axes('position',[.2 .53 .65 .17])
   hist(calr(igood,j_amp), 20)
   set(gca, 'ygrid', 'on')
   xlabel('amplitude')

% --> Time series and histogram of time shift.

tx = calr(igood, j_t);
dty = calr(igood, j_dt);
axes('position',[.2 .31 .65 .17])
   plot(calr(igood, j_t), calr(igood, j_dt), '+')
   xlabel('days')
   ylabel('time: nav - pc')
   grid
axes('position',[.2 .09 .65 .17])
   hist(calr(igood,j_dt), 20)
   set(gca, 'ygrid', 'on')
   xlabel('time: nav - pc')
   text(-0.25, -0.35, pctime, 'units', 'normalized', 'rotation', 90.0);
print -append cal.ps

