function []=arrows(x,y,u,v,linetype,fac1,fac2,coortype)
%		function []=arrow(x,y,u,v,linetype,fac1,fac2,coortype)
%		draws arrows with their tails at each point coresponding
%		to identical indices in the matrices x,y.  The matrices u
%		and v are the components of the vector to be represented.
%		fac1 is the x scaling factor and fac2 is the y scaling
%		factor.  Linetype is a string for the type of line e.g.
%		'-".  Coortype  is either 
%		    1) cartiesian components u [coortype= blank]
%		or  2) polar components r & theta [coortype='polar']
%		or  3) geo polar components r & theta [coortype='geo']

           head=0.7;   %  bigger value makes smaller arrows
           xa=x;  
           ya=y;
           if nargin == 8,
             if coortype(1:3) == 'geo', v=90 - v; end;
             ui=u.*cos(v*pi/180);
             vi=u.*sin(v*pi/180);
           else,
             ui=u;
             vi=v;
           end,
           ui=u*fac1;
	   vi=v*fac2;
	   angle=7*ones(ui/ui(1));
%.............................. Change the angle on the small arrows
     
	   ind=find(sqrt(ui.*ui+vi.*vi)<.025*(max(x)-min(x)) );
        if (length(ind)>0)
         	   angle(ind)=7*ones(ind/ind(1));
        end

           [ur1,vr1]=rot(head*ui,head*vi,angle);
           [ur2,vr2]=rot(head*ui,head*vi,-angle);
	   xplot=ones(length(xa(:)),6);
	   yplot=xplot;
	   xplot(:,1)=xa(:);
	   xplot(:,2)=xa(:)+ui(:);
	   xplot(:,3)=xa(:)+ur1(:);
	   xplot(:,4)=xa(:)+0.95*ui(:);
	   xplot(:,5)=xa(:)+ur2(:);
        xplot(:,6)=xplot(:,2);
	   yplot(:,1)=ya(:);
	   yplot(:,2)=ya(:)+vi(:);
	   yplot(:,3)=ya(:)+vr1(:);
	   yplot(:,4)=ya(:)+0.95*vi(:);
	   yplot(:,5)=ya(:)+vr2(:);
        yplot(:,6)=yplot(:,2);
   plot(xplot',yplot',linetype);
