Skip to content

BarColorConfig

BarColorConfig dataclass

Configuration for the bar colors of a bar plot.

Contributions are split into two groups, and which pair of colors applies depends on how the comparison attributes them. Measures attributed by frequency or rank use reference and comparison, for whether a token is more common in the reference or the comparison corpus. Measures attributed by score sign use reinforce and offset, for whether a token's score makes the overall difference larger or smaller. Setting a color for the pair that does not apply to the plotted comparison raises an error naming the pair that does.

Attributes:

Name Type Description
reference str | None

Color of bars attributed to the reference corpus. If None, "#F09E2E" is used

comparison str | None

Color of bars attributed to the comparison corpus. If None, "#016FBA" is used

reinforce str | None

Color of bars where the token reinforces the overall difference, making its magnitude larger. If None, "#016FBA" is used

offset str | None

Color of bars where the token offsets the overall difference, making its magnitude smaller. If None, "#E6E6E6" is used

grand_total str

Color of the grand total bar in the totals panels

Source