The grid.pattern
function supplied by gridExtra
will fill a polygon with diagonal lines. I want to increase the density of lines, i.e., the number of diagonal lines that appears in any given space. Is there an argument that I can pass to grid.pattern
that controls the density of lines?
Here's a minimal example:
library(gridExtra)
grid.pattern(pattern = 1)
That code draws a rectangle covered by diagonal lines. How can I change the code so that the rectangle includes (say) twice as many lines? I've read the function documentation and tried changing some arguments to grid.pattern
, but nothing has worked.
You can use the
granularity
argument to set the distance between the diagonal lines: