annotate_table_layout — ANNOTATE paper op

Datenarten: texttable

Aufruf: import fullseye as fs; fs.ledger.annotate_table_layout(text, xy, anchor='lt', font_size=13, font_path=None, pad=6, col_gap=None, row_gap=0, align='auto', header=False, bold=False, italic=False, line_spacing=1.15) (die Implementierung direkt: import annotate; annotate.annotate_table_layout(text, xy, anchor='lt', font_size=13, font_path=None, pad=6, col_gap=None, row_gap=0, align='auto', header=False, bold=False, italic=False, line_spacing=1.15); aus dem Register: opsannotate.get("annotate_table_layout"))

Verwendung

> Für diesen Operator gibt es noch keine Übersetzung. Es folgt der Originaltext unverändert.

table(dict)を返す: タブ区切りの文字列をとして置く桁と行の位置。

行は `\n、桁は \t` で切る。桁幅は**指定されたサイズの実フォントで

1 セルずつ測った幅の最大**で決まる —— 文字数で数えると和文と英数字で

必ずずれるので、測る以外に正しくやりようがない。

Parameters

----------

text : str

タブ区切り。全行の桁数が同じであること(違えば ValueError)。

xy : (x, y)

`anchor` で指す位置(x=col, y=row)。

anchor : str

`'lt','ct','rt','lm','cm','rm','lb','cb','rb'` の 9 通り。

pad : int

表の内側余白 [px]。

col_gap : int or None

桁の間 [px]。None(既定)なら行高 ×0.6 を四捨五入するので、

フォントサイズを変えれば間隔も一緒に動く。

row_gap : int

行の間に足す [px] (0 なら行送りのまま)。

align : str or sequence

:data:TABLE_ALIGNS のいずれか、または桁ごとの並び。`"auto"`

(既定)はその桁の値がすべて数に見えるときだけ右そろえにする。

`header=True` なら見出し行は判定から外す。

header : bool

真なら 1 行目を見出しとして太字にし、下に罫を 1 本引く。

bold, italic : bool or int

合成字体(:func:_bold_px / :func:_italic_tile)。`header` の

太字はこれとは別で、見出し行にだけ掛かる。

Returns

-------

dict

``{"rect": (x,y,w,h), "ncols", "nrows", "col_w": [...], "col_x": [...],

"row_y": [...], "row_h", "col_gap", "align": [...], "header",

"rule_y": 見出しの罫の y(header が偽なら None),

"cells": [{"text","row","col","xy","width","bold"}]}``。

`col_x / row_y / cells[i]["xy"]` はすべて画像座標

Raises

------

ValueError

桁数が行でそろわない / 空 / 未知の `align anchor` /

`align` の長さが桁数と違う。

Examples

--------

>>> import annotate

>>> lay = annotate.annotate_table_layout("名前\t値\nA\t1.5\nB\t22.25", (10, 10))

>>> lay["ncols"], lay["nrows"], lay["align"]

(2, 3, ['left', 'left'])

>>> lay2 = annotate.annotate_table_layout("名前\t値\nA\t1.5\nB\t22.25", (10, 10),

... header=True)

>>> lay2["align"] # 見出しを外すと 2 桁目は数だけ

['left', 'right']

Ausführlicher Anwendungsleitfaden

Leitfaden zur Familie figure_annotation

Hintergrundwissen (Physik und Konventionen hinter diesem Operator)

dataset_conventions — 学習データセット規約の知識 — COCO / YOLO / VOC と外観検査での落とし穴

Referenzen (Beispieldaten, Literatur)

• Katalog der Beispieldaten (Download-URLs / Lizenzen) — 2-D nutzt skimage.data (BSD/Public Domain) plus synthetische Bilder, 3-D nennt Download-URLs echter Datenquellen (Stanford, PDS, …).

• Herkunft und Literatur der Operatoren — die Quellen der Forschung/Verfahren, auf denen diese Operatorfamilie beruht.

• Der kanonische Algorithmus (Autor, Jahr) und seine Anwendungen stehen im Familienleitfaden oben.

Ausführbare Beispiele (verifizierte Samples, die diesen Operator wirklich aufrufen)

annotate_paper_tourpy -3.11 examples/annotate_paper_tour.py

Typkompatible Folge-Operatoren (nehmen table als Eingabe)

Gleiche Kategorie (paper)

annotate_leader_layout · annotate_leader · annotate_markers · annotate_legend · annotate_dimension_layout · annotate_dimension · annotate_angle_layout · annotate_angle


*Provenance: annotate.py — ANNOTATE Operator-Registry. Diese Notiz wird von tools/opdocs.py md erzeugt (nicht von Hand bearbeiten).*

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