hspan and vspan

hspan(ys_low, ys_high; xmin = 0.0, xmax = 1.0, attrs...)              

Create horizontal bands spanning across a Scene with 2D projection. The bands will be placed from ys_low to ys_high in data coordinates and xmin to xmax in scene coordinates (0 to 1). All four of these can have single or multiple values because they are broadcast to calculate the final spans.

All style attributes are the same as for Poly .

vspan(xs_low, xs_high; ymin = 0.0, ymax = 1.0, attrs...)              

Create vertical bands spanning across a Scene with 2D projection. The bands will be placed from xs_low to xs_high in data coordinates and ymin to ymax in scene coordinates (0 to 1). All four of these can have single or multiple values because they are broadcast to calculate the final spans.

All style attributes are the same as for Poly .

using CairoMakie

lines(0..20, sin)
vspan!([0, 2pi, 4pi], [pi, 3pi, 5pi],
    color = [(c, 0.2) for c in [:red, :orange, :pink]])
hspan!(-1.1, -0.9, color = (:blue, 0.2))
current_figure()