Say, for example, I had ...
x = [1 1 2 2]; y = [1 2 2 1]; plot(x, y, \'b-\');
I will get a plot with lines connecting the points (1,1), (1,
Unless your final and last points are the same then plot won't know that you want a closed curve. So either add an additional point to your list to plot or try using, for example, rectangle.
plot