Axis band

axis.bandNode

Shades an interval on an axis across the whole plot — a reference band the marks are read against: an operating range, the recession quarters, $\pm\sigma$. It draws under the grid and the marks. The axis is chosen by which interval is given, as with axis.label's coordinate.

#Attributes

labelImplicit
Also written: text, nameThe name at the band's edge. Rich text; optional — a band says something with no words on it.Can be written as shorthand: axis.band:value
The interval to shade along the x axis, e.g. [2008, 2009.5]. Give exactly one of x or y; either end may ride a parameter.
The interval to shade along the y axis.
colourAnimatable
neutralredorangeyellowgreentealbluepurplepinkgreywhiteblack
Also written: colorBand and label colour.
Defaultgrey
opacityAnimatable
The wash's opacity.
Default0.15
edgesAnimatable
Dashed hairline rules at the band's two edges.
Defaultfalse
sizeAnimatable
Also written: text-sizeLabel text size.
Default20
hiddenAnimatable
Declared but not drawn. Animatable, for reveals.
Defaultfalse

#Allowed in

#Examples

axis.band(label: recession; x: [2008, 2009.5])
axis.band(y: [-1, 1]; colour: teal; edges: true)