grid

A layout of a scene's canvas environments in rows and columns.

On this page
Anscombe's quartet in a two-by-two grid: four scatters with the same mean, variance and fitted line, one a cloud, one a curve, one a line with an outlier, one a column with a single far point.Anscombe's quartet in a two-by-two grid: four scatters with the same mean, variance and fitted line, one a cloud, one a curve, one a line with an outlier, one a column with a single far point.

#Attributes

columnsImplicit
How many environments sit across.
123
Can be written as shorthand: grid:value

#Allowed content

#Allowed in

#Examples

A grid of two: the unit disc beside the parallelepiped spanned by three columns, with the area formula written under the grid, across the whole canvas.A grid of two: the unit disc beside the parallelepiped spanned by three columns, with the area formula written under the grid, across the whole canvas.
grid{
    graph{
        curve(x: cos(t); y: sin(t); t: [0, 2 * pi]; colour: purple; fill-style: solid)
    }
    graph:xyz{
        vector(dx: 1; dy: 0; dz: -2; colour: blue)
        vector(dx: 1; dy: 2; dz: 4; colour: teal)
        vector(dx: 7; dy: 1; dz: 0; colour: red)
    }(
        aspect: equal
    )
}

equation{
    \text{area of } T(S) = |\det A| \cdot \text{area of } S
}

#Notes

  • The body holds only canvas environments, placed across then down.
  • Each environment keeps its own frame and cues; the scene's steps and parameters reach every one.
  • A scene with a grid holds all its environments in it. An environment written beside the grid is a compile error: A scene with a grid holds its environments in the grid; write 'graph' inside it.
  • A scene has one grid at most, holding one to nine environments: a second grid, an empty grid and a grid of more than nine are compile errors.
  • Without a grid a scene's detail holds at most two environments: A scene detail holds at most two canvas environments; found 3 — a grid holds up to nine.

#Writing guidance

Last updated