Q:

Matlab rejection sampling points not displayed

I am using the following code for Pi approximation, using the rejection sampling method. 
% DISPLAY A CIRCLE INSCRIBED IN A SQUARE

figure;
a = 0:.01:2*pi;
x = cos(a); y = sin(a);
hold on
plot(x,y,'k','Linewidth',2)

t = text(0.5, 0.05,'r');
l = line([0 1],[0 0],'Linewidth',2);
axis equal
box on
xlim([-1 1])
ylim([-1 1])
title('Unit Circle Inscribed in a Square')

pause;
rand('seed',12345)
randn('seed',12345)
delete(l); delete(t);

% DRAW SAMPLES FROM PROPOSAL DISTRIBUTION
samples = 2*rand(2,100000) - 1;

% REJECTION
reject = sum(samples.^2) > 1;

% DISPLAY REJECTION CRITERION
scatter(samples(1,~reject),samples(2,~reject),'b.')
scatter(samples(1,reject),samples(2,reject),'rx')
hold off
xlim([-1 1])
ylim([-1 1])

The expected result should be a blue circle inside of a red square. When I run the code the red point for building the square are displayed, but the blue point not. 
The expected result should be as the picture found at this Link
But I get the following result:

Does anybody know what I can possibly do in order to visualize the blue points as well? Thanks in advance.

A:

The scatter function is probably not the best choice for such huge number of points. Try this instead:
t = 0:.01:2*pi;
x = cos(t); y = sin(t);

samples = 2*rand(2,100000) - 1;
reject = sum(samples.^2) > 1;

props = {'LineStyle','none', 'Marker','.', 'MarkerSize',1};
line(x, y, 'Color','k', 'LineWidth',2)
line(samples(1,~reject), samples(2,~reject), props{:}, 'Color','b')
line(samples(1,reject), samples(2,reject), props{:}, 'Color','r')
axis equal; axis([-1 1 -1 1])
box on

