mpl_themes¶
mpl_themes
¶
Matplotlib theme for Charité – Universitätsmedizin Berlin (and other registered brands).
theme_charite = partial(theme, brand='charite')
module-attribute
¶
Matplotlib rcParams for Charité: theme with brand="charite" (same parameters, positional order kept).
theme_bih = partial(theme, brand='bih')
module-attribute
¶
Matplotlib rcParams for the BIH: theme with brand="bih" (same parameters).
theme(font=None, font_size=10, thickness=0.5, grid=False, palette=None, background='white', tiny_margins=False, interactive=False, *, brand=DEFAULT_BRAND)
¶
Return matplotlib rcParams dict for a corporate identity theme.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
font
|
str | None
|
Preferred font family. Falls back through the brand's font stack (for Charité: Charité Text Office → Calibri → DejaVu Sans → sans-serif) if the requested font is not installed. |
None
|
font_size
|
int
|
Base font size in points. Defaults to 10 for screen; use 8 for print. |
10
|
thickness
|
float
|
Axis line and tick width. Mirrors the R |
0.5
|
grid
|
bool
|
Show major grid lines. Disabled by default. |
False
|
palette
|
str | list[str] | None
|
Name of one of the brand's palettes or a list of hex color strings used
for the |
None
|
background
|
str
|
Figure and axes background color. |
'white'
|
tiny_margins
|
bool
|
Minimise all margins around the plot panel. Useful for dense layouts or when saving figures with little surrounding whitespace. |
False
|
interactive
|
bool
|
Enable matplotlib interactive mode (equivalent to |
False
|
brand
|
str | Brand
|
Registered brand name (default |
DEFAULT_BRAND
|
enable(**kwargs)
¶
Apply a brand theme (Charité by default) to matplotlib's global rcParams (permanent until reset).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
Any parameter accepted by |
{}
|
Examples: