Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
提供的grid.pattern函数gridExtra将用对角线填充多边形。我想增加线条的密度,即出现在任何给定空间中的对角线的数量。有没有我可以传递的论点来grid.pattern控制线条的密度?
grid.pattern
gridExtra
这是一个最小的例子:
library(gridExtra) grid.pattern(pattern = 1)
该代码绘制了一个由对角线覆盖的矩形。如何更改代码以使矩形包含(比如说)两倍的行?我已经阅读了函数文档并尝试将一些参数更改为grid.pattern,但没有任何效果。
您可以使用granularity参数来设置对角线之间的距离:
granularity
library(gridExtra) grid.pattern(pattern = 1, granularity = unit(2.5, "mm")) ## (Default is 5 mm)