Skip to content

ScoreAxisConfig

ScoreAxisConfig dataclass

Configuration for the score axis of a bar or word shift plot.

The score axis is the axis along which token contributions extend.

Attributes:

Name Type Description
title str | None

Label for the score axis. Defaults to "Contribution", which becomes "Percent contribution" when the scores are shown as percentages (i.e. normalized). Set a different string to override, or None to hide the title

title_color str | None

Color of the title. If None, Altair's default is used

title_fontsize float | None

Font size of the title, in pixels. If None, Altair's default is used

label_color str | None

Color of the axis tick labels. If None, Altair's default is used

label_fontsize float | None

Font size of the axis tick labels, in pixels. If None, Altair's default is used

tick_color str | None

Color of the axis ticks. For the color of the tick labels, see label_color. If not None, overrides BorderConfig.color

grid bool

Whether to draw grid lines along the score axis

grid_color str | None

Color of the grid lines

axis_color str | None

Color of the axis line. If not None, overrides BorderConfig.color

width float

Width of the axis, in pixels

Source