element-blank
Blank element: hides the corresponding theme element.
Pass the result to theme under keys like panel-grid or axis-line to turn them off entirely.
Usage
element-blank()Returns
Element dictionary consumed by theme.
Examples
Hide the panel grid entirely.
#let d = range(0, 10).map(i => (x: i, y: i * 0.5))
#plot(
data: d,
mapping: aes(x: "x", y: "y"),
layers: (geom-point(size: 2pt),),
theme: theme(panel-grid: element-blank()),
width: 10cm,
height: 6cm,
)Combine element-blank with other overrides to remove multiple non-data marks at once.
#let d = range(0, 10).map(i => (x: i, y: i * 0.5))
#plot(
data: d,
mapping: aes(x: "x", y: "y"),
layers: (geom-point(size: 2pt),),
theme: theme(
panel-grid: element-blank(),
axis-line: element-blank(),
),
width: 10cm,
height: 6cm,
)