绘制多个矩形

时间:2016-03-15 19:32:49

标签: r

我是R中真正的假人。你能解释一下如何使用rect如下图所示绘制多个矩形吗?

谢谢!

enter image description here

1 个答案:

答案 0 :(得分:2)

plot(c(0, 100), c(0, 100), type = "n", axes = FALSE, xlab = "", ylab = "")
rect(10, 10, 90, seq(10, 90, 1), border = "lightgray", lwd = 3)