multi-plot2 directive#
The multi-plot2 directive arranges nested plot blocks in a grid layout. Unlike multi-plot (which takes a list of function expressions), multi-plot2 gives each subplot its own full plot directive — allowing different drawing primitives, styles, and overlays per panel.
Basic usage#
:::::{multi-plot2}
---
rows: 1
cols: 2
---
:::{plot}
function: x**2, f
:::
:::{plot}
function: x**3, g
:::
:::::
Syntax overview#
The container specifies the grid dimensions and shared styling. Each nested plot is a full plot directive.
Options#
Container options#
Option |
Meaning |
Default |
|---|---|---|
|
Number of grid rows |
|
|
Number of grid columns |
|
|
CSS width of the combined figure |
— |
|
|
— |
Other options#
Option |
Meaning |
|---|---|
|
Extra CSS classes |
|
Stable anchor / reference name |
|
Alt text |
|
Force regeneration |
|
Keep debug output |
Tips#
Shared options set on the container are inherited by all nested
plotblocks but can be overridden per subplot.Use
multi-plotwhen all subplots share the same structure and only differ by function expression.