forestploter.ForestTheme
- class forestploter.ForestTheme(base_font_size=8.5, header_fill='#EAF0F6', alternate_fill='#F7F9FC', group_fill='#F0F4F8', text_color='#202B33', muted_color='#667085', ci_colors=('#1F4E79', '#D97706', '#4472C4'), summary_fill='#1F4E79', grid_color='#D0D5DD', reference_color='#344054', ideal_color='#C69C3C', show_vertical_grid=False, reference_line_style='--', ideal_line_style=':', show_table_border=False)[source]
Define visual styles for the table, text, intervals, and guide lines.
- Parameters:
- base_font_sizefloat, default 8.5
Base font size for headers, body text, ticks, and legends, in points.
- header_fillstr, default “#EAF0F6”
Header background color.
- alternate_fillstr, default “#F7F9FC”
Alternating fill used for odd-indexed rows that are neither spacers nor group headers.
- group_fillstr, default “#F0F4F8”
Background color for
"header"group rows.- text_colorstr, default “#202B33”
Header, body, tick, and default series-text color.
- muted_colorstr, default “#667085”
Color for secondary text such as bottom direction labels.
- ci_colorstuple of str, default (“#1F4E79”, “#D97706”, “#4472C4”)
Colors cycled across series when
series_stylesis omitted. The tuple must contain at least one color when default styles are used.- summary_fillstr, default “#1F4E79”
Reserved summary-diamond fill. The current renderer uses the matching series
colorand does not yet read this field.- grid_colorstr, default “#D0D5DD”
Color for horizontal rules, optional vertical rules, and borders.
- reference_colorstr, default “#344054”
Color for
ref_lineand its legend entry.- ideal_colorstr, default “#C69C3C”
Color for
ideal_lineand its legend entry.- show_vertical_gridbool, default False
Whether to draw vertical column separators. This setting is independent of
show_table_border.- reference_line_stylestr, default “–”
Matplotlib line style for the reference line.
- ideal_line_stylestr, default “:”
Matplotlib line style for the ideal line.
- show_table_borderbool, default False
Whether to add side borders and internal horizontal row separators. The default is a three-rule table: a rule above and below the column headers, plus a bottom rule, with no internal row separators or side borders. These three rules remain visible with either setting. Set
show_vertical_grid=Trueas well for a fully boxed table.
- Parameters:
base_font_size (float)
header_fill (str)
alternate_fill (str)
group_fill (str)
text_color (str)
muted_color (str)
ci_colors (tuple[str, ...])
summary_fill (str)
grid_color (str)
reference_color (str)
ideal_color (str)
show_vertical_grid (bool)
reference_line_style (str)
ideal_line_style (str)
show_table_border (bool)
Notes
Theme objects are frozen data classes and can be reused safely. Create a new instance for per-call changes instead of mutating during rendering.
- __init__(base_font_size=8.5, header_fill='#EAF0F6', alternate_fill='#F7F9FC', group_fill='#F0F4F8', text_color='#202B33', muted_color='#667085', ci_colors=('#1F4E79', '#D97706', '#4472C4'), summary_fill='#1F4E79', grid_color='#D0D5DD', reference_color='#344054', ideal_color='#C69C3C', show_vertical_grid=False, reference_line_style='--', ideal_line_style=':', show_table_border=False)
- Parameters:
base_font_size (float)
header_fill (str)
alternate_fill (str)
group_fill (str)
text_color (str)
muted_color (str)
ci_colors (tuple[str, ...])
summary_fill (str)
grid_color (str)
reference_color (str)
ideal_color (str)
show_vertical_grid (bool)
reference_line_style (str)
ideal_line_style (str)
show_table_border (bool)
- Return type:
None
Methods
__init__([base_font_size, header_fill, ...])Attributes
alternate_fillbase_font_sizeci_colorsgrid_colorgroup_fillheader_fillideal_colorideal_line_stylemuted_colorreference_colorreference_line_styleshow_table_bordershow_vertical_gridsummary_filltext_color