Skip to content

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 ribbon trace.

python
from gofish import layer, chart, spread, blank, select_all, area

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

Signature ​

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

Parameters ​

An invisible sizing/positioning guide — a rect that emits no display items at all, with a restricted channel set (no x/y/cx/cy/x2/y2/theta/r — position it via a layout operator).

OptionTypeDefaultDescription
em_xboolEmbed x in the parent's x space.
em_yboolEmbed y in the parent's y space.
wint | float | str0Width.
hint | float | str0Height.
fillstrFill color. A blank never paints; fill only seeds the shared color scale.
debugboolDev-only flag: logs this mark's key and datum to the console as it is built. It changes nothing about what is drawn.

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_all() it and draw a line, ribbon, 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_all("points")).mark(line())

Notes ​

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