legend_box — ANNOTATE furniture op

• Data kinds: image2d × entries → image2d

• Call: import fullseye as fs; fs.ledger.legend_box(img, entries, xy, anchor='lt', swatch=14, row_gap=4, pad=8, font_size=13, box_color=None, box_alpha=0.72, markers=False, scheme='okabe_ito', font_path=None, min_font_size=9, style=None, border=1, border_color='neutral') (to call the implementation directly, import annotate; annotate.legend_box(img, entries, xy, anchor='lt', swatch=14, row_gap=4, pad=8, font_size=13, box_color=None, box_alpha=0.72, markers=False, scheme='okabe_ito', font_path=None, min_font_size=9, style=None, border=1, border_color='neutral'); from the registry, opsannotate.get("legend_box"))

Usage

A legend of colours against descriptions. The box height follows in closed form from the number of entries.

height = 2*pad + n*row_h + (n-1)*row_gap (row_h = max(swatch, text height)).

Parameters

entries : sequence

Sequence of (color, text). color may be a role name or RGB.

markers : bool

If True, the symbol from palette.ROLE_MARKERS that corresponds to the role name is

put in front of the description (so as not to put meaning in colour alone). Elements that are not role names

have no symbol, so none is added.

Returns

ndarray

Raises

ValueError

entries empty / shape is not (color, text) / box sticks out of the image /

unknown role name.

Detailed usage guide

• figure_annotation family guide

Background guides (the physics and conventions behind this op)

• dataset_conventions — Training-dataset conventions — COCO / YOLO / VOC and pitfalls in visual inspection

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• annotate_gallery — py -3.11 examples/annotate_gallery.py

• poc_driving_decisions — py -3.11 examples/poc_driving_decisions.py

• poc_measurement_system_analysis — py -3.11 examples/poc_measurement_system_analysis.py

• poc_pxrd_phase_peel — py -3.11 examples/poc_pxrd_phase_peel.py

Ops the type connects to (they accept image2d as input)

text_box · arrow · leader_line · label_points · crosshair · color_bar · scale_bar · axes_frame

Same category (furniture)

color_bar · scale_bar


*Provenance: annotate.py — ANNOTATE operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.