function [xmin xmax ymin ymax] = location_for_count(number_of_site,widthofinterest)
%Function to use graphical input from the mouse to get the location of
%interest and to draw a square with x and y widthofinterest and label it.
%
%Ramon Arrowsmith, May 2010


rangeulandlr = ginput;
xmin=rangeulandlr(1,1);
xmax=xmin+widthofinterest;
ymin=rangeulandlr(1,2);
ymax=ymin+widthofinterest;

plot([xmin xmax xmax xmin xmin], [ymin ymin ymax ymax ymin],'k-')
s = sprintf(number_of_site);
text(xmin, ymin, s, 'VerticalAlignment','top')