function plottraj_simple(lon,lat,t,id,colr);

% plottraj_simple(lon,lat,t,id,colr);
%   set colr=1 for color, 0 for black&white

if ~exist('colr') colr=1; end;

subs=2; % subsample trajectories at this time step (days)

deltt=median(diff(t));

q=find(diff(id) | abs(diff(lon))>10 | diff(t)>10);
q=[0;q;length(id)];
plot(lon(1),lat(1),'.w','markersize',1);
overlay;
hold on;
% plot trajectories
for i=2:length(q);
    a=q(i-1)+1:q(i);
    if (deltt<subs)
        ind=1:round(subs/deltt):length(a);
    else
        ind=1:length(a);
    end;
    col=rand(1,3);
    while (sum(col)>2.5)
	col=rand(1,3);
    end;
    if (colr==0)
        col=[.35 .35 .35];
    end;
    plot(lon(a(ind)),lat(a(ind)),'color',col);
end;
% overlay starting locations
for i=2:length(q);
    a=q(i-1)+1:q(i);
    plot(lon(a(1)),lat(a(1)),'pk','markersize',3);
end;

hold off;
asprat
