RankAxisConfig
RankAxisConfig
dataclass
¶
Configuration for the rank axis of a bar or word shift plot.
The rank axis is the axis along which tokens are listed in order of contribution.
Attributes:
| Name | Type | Description |
|---|---|---|
bar_width |
float
|
Amount of space, in pixels, that each rank occupies. This implicitly controls the height/width of the plot, depending on whether it is vertical/horizontal respectively |
bar_padding |
float
|
Amount of space, given to padding between bars, as a fraction between 0 and 1. When |
axis_padding |
float
|
Amount of space given to adding space between the first and last bar and the axis.
The space is a fraction between 0 and 1 of the |
title |
str | None
|
Label for the rank axis. If |
title_color |
str | None
|
Color of the title. If |
title_fontsize |
float | None
|
Font size of the title, in pixels. If |
label_color |
str | None
|
Color of the axis tick labels. If |
label_fontsize |
float | None
|
Font size of the axis tick labels, in pixels. If |
label_tick_values |
list[int] | None
|
Explicit list of rank values at which to place ticks. When set, takes precedence over
|
label_tick_step |
int | None
|
Spacing between rank tick marks (e.g. |
label_first_tick |
bool
|
Whether to include a tick at rank 1 in addition to the ticks defined by
|
tick_color |
str | None
|
Color of the axis ticks. For the color of the tick labels, see |
grid |
bool
|
Whether to draw grid lines along the rank axis |
grid_color |
str | None
|
Color of the grid lines |
axis_color |
str | None
|
Color of the axis line. If not |
width |
float
|
Width of the axis, in pixels |