A pavement closes its box where values are spread out and opens
a gap where they clump onto a value line — identically across all five
backends.
Each bin draws its long top and bottom edges only over itself, and only
when one or more values fall strictly inside it. Below, every backend
renders the same three cases (boxes drawn outline-only, so the
gap — a missing stretch of top/bottom edge — reads clearly): iris
sepal_width binned into 8, which gaps in the dense middle; the
same data with show_box=True to force the complete box; and a
spread distribution, which stays closed. Compare a column down the page — every
backend opens and closes the box at the same places.
SVG spark
Inline, self-contained SVG — no JavaScript.
iris sepal_width, 8 bins — the box gaps in the dense middle, where 2.8–3.1 cm are so common they all sit on bin edgesSame data, show_box=True — the complete box, forcedA spread distribution, 8 bins — every bin is populated, so the box stays closed end to end
matplotlib plot
Static raster (PNG), for print.
iris sepal_width, 8 bins — the box gaps in the dense middle, where 2.8–3.1 cm are so common they all sit on bin edges
Same data, show_box=True — the complete box, forced
A spread distribution, 8 bins — every bin is populated, so the box stays closed end to end
Plotly plot
Interactive — hover, pan, zoom.
iris sepal_width, 8 bins — the box gaps in the dense middle, where 2.8–3.1 cm are so common they all sit on bin edges
Same data, show_box=True — the complete box, forced
A spread distribution, 8 bins — every bin is populated, so the box stays closed end to end
Bokeh plot
Interactive — hover, pan, zoom.
iris sepal_width, 8 bins — the box gaps in the dense middle, where 2.8–3.1 cm are so common they all sit on bin edges
Same data, show_box=True — the complete box, forced
A spread distribution, 8 bins — every bin is populated, so the box stays closed end to end
HoloViews plot
Backend-agnostic (rendered via Bokeh).
iris sepal_width, 8 bins — the box gaps in the dense middle, where 2.8–3.1 cm are so common they all sit on bin edges
Same data, show_box=True — the complete box, forced
A spread distribution, 8 bins — every bin is populated, so the box stays closed end to end
Drawn straight from
pavement.svg, pavement.matplotlib,
pavement.plotly, pavement.bokeh, and
pavement.holoviews — one shared geometry, one shared rule.
Rugs are borderless by default
SVG spark — the same rule applies on every backend.
A binned pavement always draws the box. A rug (bins=None) drops the box edges by default, so it reads like an ordinary rug plot — the box becomes a visual cue that you are looking at quantile bins, not raw points. show_box=True restores the box on a rug; show_box=False drops it from a binned plot.
Binned (bins=4) — box always onRug (bins=None) — borderless by defaultRug + show_box=True — box forced back on
Show code
import pavement.svg as psvg
# A binned pavement always draws its box:
psvg.spark(data, bins=4)
# A rug drops the box edges by default:
psvg.spark(data, bins=None)
# Force the box back on a rug:
psvg.spark(data, bins=None, show_box=True)
# Drop the box from a binned plot:
psvg.spark(data, bins=4, show_box=False)