Skip to main content

grid

grid() 

Draws a grid between two coordinates

// Draw a grid
grid((0,0), (2,2))

// Draw a smaller blue grid
grid((1,1), (2,2), stroke: blue, step: .25)

The top left of the grid

The bottom right of the grid

Styling

Root: grid

step:

Default: 1

Distance between grid lines. A distance of 11 means to draw a grid line every 11 length units in x- and y-direction. If given a dictionary with x and y keys or a tuple, the step is set per axis.

help-lines:

Default: false

[If true, force the stroke style to gray + 0.2pt

Anchors

Supports border anchors.