function [img] = generate_im_with_list(im, template, plist, npoints)

img = im;
for i=1:npoints,
  row = plist(i,1);
  col = plist(i,2);
  img(row:(row+ size(template,1)-1), col:(col+size(template,2)-1)) = template;

end
image(img);
msg = sprintf('Size (%d,%d) with %d templates.', size(img,1), size(img,2),npoints);
title(msg);
axis('off');
axis('image');
return;

