n=10000;
colorstr=['b' 'r' 'g' 'y'];          
for k=1:4
  z=2.*(rand(2,n)<0.5)-1; 
  x=[zeros(1,2); cumsum(z')];
  col=colorstr(k);
  plot(x(:,1),x(:,2),col);
  hold on
end
grid
