function ph = quiverc(x,y,u,v)
%   QUIVERC(X,Y,U,V) plots velocity vectors as arrows with components (u,v)
%   at the points (x,y). The matrices X,Y,U,V must all be the same size
%   and contain corresponding position and velocity components (X and Y
%   can also be vectors to specify a uniform grid).  QUIVER automatically
%   scales the arrows to fit within the grid. Each arrow is colored using
%   the LINES colormap.
%   Example: 
%   z = exp(1i*linspace(0,2*pi));
%   u = imag(z(1:end-1)); 
%   v = real(z(1:end-1));
%   x = 0*u;
%   y = 0*u;
%   quiverc(x,y,u,v)

cmap = colormap;
m = size(cmap,1);
ph = zeros(1,numel(x));
ph(1) = quiver(x(1),y(1),u(1),v(1),'color',cmap(1,:));
hold on
for k = 2:numel(x)
  ph(k) = quiver(x(k),y(k),u(k),v(k),'color',cmap(floor((k-1)/numel(x)*m)+1,:));
end
hold off