比方说,我有......
x = [1 1 2 2]; y = [1 2 2 1]; plot(x, y, 'b-');
我将得到一个连接点(1,1),(1,2)和(2,2)的线图.有没有办法将最后一点与第一点连接起来,从而完成情节上的方块?
我也用点数拉出文本行,所以简单地添加另一个点1,1不是一个选项.
graphics matlab plot 2d matlab-figure
2d ×1
graphics ×1
matlab ×1
matlab-figure ×1
plot ×1