function h = plotcolour(x,y,col);
% PLOTCOLOUR Plot dots with coordinates X,Y coloured according
%         to COL.  H is a vector of handles for dots of each color.
%    H = PLOTCOLOUR(X,Y,COL);

  cmap = jet(64);  cmap(end,:) = 0;
  crng = [min(col(:)) max(col(:))];
  nc = size(cmap,1);  pc = (0:nc)'./nc.*diff(crng) + crng(1);
  h = zeros(nc,1);  ih = 0;
  for ic = 1:nc,
    ip = find(col >= pc(ic) & col <= pc(ic+1));
    if ~isempty(ip),  ih = ih + 1;
      h(ih) = plot(x(ip),y(ip),'.','markersize',2,...
                   'color',cmap(nc-ic+1,:));  hold on;
    end,
  end,  hold off; 
  if ih < nc, h(ih+1:nc) = []; end,

return;