MATLAB: Scatter plot is being skipped

helpcenternot displayingnot workingquasi-randomscatterskipping codetutorial

I am following the "Generating Quasi-Random Numbers" page from the Help Center (link), but MatLab skips the Quasi-Random Scatter plot. The Uniform random scatter works fine… There are no code errors according to the program.
Why is this happening?
Here is the code:
rng default % For reproducibility
p = haltonset(2,'Skip',1e3,'Leap',1e2);
%% Quasi-Random Point Sets
X0 = p(1:500,:);
scatter(X0(:,1),X0(:,2),5,'r')
axis square
title('{\bf Quasi-Random Scatter}')
%% Uniform Random Scatter
X = rand(500,2);
scatter(X(:,1),X(:,2),5,'b')
axis square
title('{\bf Uniform Random Scatter}')

Best Answer

hold on
is not active so the second plot replaces the first