【发布时间】:2021-05-16 15:20:54
【问题描述】:
我想用base R only画一个矩形:
矩形:宽 = 2.5 厘米,高 = 1 厘米
期望的输出:
drawBox 原则上可以做到这一点,但我正在寻找一个基本的 R 解决方案:
library(draw)
drawBox(x =1.5, y = 4, width = 2.5, height = 1)
【问题讨论】:
-
见
help("rect") -
已经尝试过:示例中的这段代码:
plot(c(100, 200), c(300, 450), type= "n", xlab = "", ylab = "") rect(100, 300, 125, 350) # transparent在坐标系中给出了一个矩形。我只想要一个矩形。
标签: r graphics rectangles