geom-blank
Invisible layer used to extend trained scales without drawing marks.
Typical mappings are x and / or y; any aesthetic in the mapping participates in scale training so the panel reserves room for the implied range.
Usage
geom-blank(
mapping: none,
data: none,
inherit-aes: true,
)Parameters
| Parameter | Default | Description |
|---|---|---|
mapping |
none |
Layer-specific aesthetic mapping built with aes. Falls back to the plot mapping when none. |
data |
none |
Layer-specific dataset. Falls back to the plot data when none. |
inherit-aes |
true |
Whether to merge the plot-level mapping into this layer’s mapping. |
Returns
Layer dictionary consumed by plot.
Examples
Two corner rows train the axes without drawing any marks.
#let frame = ((x: 0, y: 0), (x: 10, y: 5))
#plot(
data: frame,
mapping: aes(x: "x", y: "y"),
layers: (geom-blank(),),
width: 10cm,
height: 6cm,
)Stack a blank under geom-function to reserve room for the curve’s domain without overriding the function output.
#let frame = ((x: -2, y: -1), (x: 2, y: 4))
#plot(
data: frame,
mapping: aes(x: "x", y: "y"),
layers: (
geom-blank(),
geom-function(fun: x => x * x),
),
width: 10cm,
height: 6cm,
)