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_styles is 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 color and 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_line and its legend entry.

ideal_colorstr, default “#C69C3C”

Color for ideal_line and 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=True as 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_fill

base_font_size

ci_colors

grid_color

group_fill

header_fill

ideal_color

ideal_line_style

muted_color

reference_color

reference_line_style

show_table_border

show_vertical_grid

summary_fill

text_color