function connect_dots(X,axis_size)
%function connect_dots(X)
%connects points from X a 2-by-n matrix
dim = size(X);
if(dim(1)~=2)
    error('X has to be a 2-by-n matrix');
end

X(:,end+1) = X(:,1);
plot(X(1,:),X(2,:),'.-','MarkerSize',20,'LineWidth',2);
fill(X(1,:),X(2,:),'r');
axis(axis_size*[-1 1 -1 1])
axis square
end
