LabelConfig
LabelConfig
dataclass
¶
Configuration for the token labels of a bar or word shift plot.
Controls how token text is positioned, oriented, and styled relative to its bar.
Attributes:
| Name | Type | Description |
|---|---|---|
pad |
float
|
Padding between a label and the end of its bar, in pixels |
color |
str
|
Font color of the label text |
size |
float | None
|
Font size of the label text, in pixels. If |
weight |
str | int
|
Font weight of the label text. Accepts CSS font-weight strings (e.g. |
rotation |
float | None
|
Rotation of the label text, in degrees. If |
mirror_rotation |
bool
|
When |
on_bar_ends |
bool
|
When |
font_width_to_height_ratio |
float
|
Assumed ratio of character width to character height for the label font. Used by autoscaling to estimate label widths from font size |
borrow_symbol |
str | None
|
A symbol appended to the end of a token's label indicating that it "borrowed" a score
across corpora. If |