Skip to content
Internals

blank

An invisible mark. blank takes up space and can be positioned and named like any other mark, but draws nothing. It is the positioning guide that line and area trace.

python
from gofish import Layer, chart, spread, blank, select, area

Layer([
    chart(lake_totals)
        .flow(spread(by="lake", dir="x", spacing=64))
        .mark(blank(h="count").name("points")),
    chart(select("points")).mark(area(opacity=0.8)),
]).render(w=500, h=300, axes=True)

Signature

python
blank(w=None, h=None, **options) -> Mark

Parameters

ParameterTypeDescription
w, hint | strWidth / height — a constant or a field name

Returns a Mark for use in .mark().

Why use a blank?

A blank lets you run a full layout — spread, stack, scatter — and capture the positions without drawing anything. Name the result with .name(...), then have another chart select() it and draw a line, area, or other mark through those positions.

python
# Position points, draw nothing — then connect them
chart(data).flow(scatter(by="lake", x="x", y="y")).mark(blank().name("points"))
chart(select("points")).mark(line())

Notes

  • A blank still occupies layout space; its w/h participate in scales and positioning even though nothing is painted.