plot([1 2 3 1],[2 1 2 2],'r'); hold on plot([0 4 0],[0 0 4],'bo'); hold on plot([0 2],[0 1],'g',[3 4],[2 0],'g',[0 1],[4 2],'g'); axis square;