function [loc1,loc2] = rand_perm_loc_plot(L1,L2,poly);

%RAND_PERM_LOC_PLOT plots out randomly permuted locations for two sets of
%point pattern locations L1 and L2 in a polygon, poly.

n1 = size(L1,1);

n2 = size(L2,1);

n = n1 + n2;

loc = [L1;L2];

I = randperm(n);

I1 = I(1:n1); 

I2 = I(n1+1:end);

loc1 = loc(I1,:); 

loc2 = loc(I2,:);

poly_plot(poly); 

hold on;

plot(loc1(:,1),loc1(:,2),'.r','MarkerSize',12);

hold on;

plot(loc2(:,1),loc2(:,2),'.','MarkerSize',12);
