Source code for tud_lbm.io.plotting.figure_config

"""Centralized figure styling shared by every plot operator in this package."""

from __future__ import annotations
from dataclasses import dataclass
from dataclasses import field


@dataclass(frozen=True)
[docs] class FigureStyle: """Tunable styling knobs for all figures produced by ``io.plotting``."""
[docs] dpi: int = 150
[docs] panel_figsize: tuple[float, float] = (5.0, 4.0)
[docs] analysis_figsize: tuple[float, float] = (7.0, 4.5)
[docs] comparison_figsize: tuple[float, float] = (10.0, 6.0)
[docs] dual_axis_figsize: tuple[float, float] = (10.0, 6.0)
[docs] ca_theta_figsize: tuple[float, float] = (10.0, 6.0)
[docs] suptitle_fontsize: int = 12
[docs] title_fontsize: int = 14
[docs] axis_label_fontsize: int = 16
[docs] tick_label_fontsize: int = 12
[docs] legend_fontsize: int = 12
[docs] pair_legend_fontsize: int = 8
[docs] panel_legend_fontsize: int = 6
[docs] empty_state_fontsize: int = 9
[docs] error_text_fontsize: int = 8
[docs] comparison_axis_label_fontsize: int = 24
[docs] comparison_tick_label_fontsize: int = 16
[docs] comparison_legend_fontsize: int = 12
[docs] scatter_marker_size: int = 16
[docs] scatter_alpha: float = 0.8
[docs] colormap_density: str = "viridis"
[docs] colormap_velocity: str = "plasma"
[docs] colormap_force: str = "cividis"
[docs] quiver_color: str = "white"
[docs] quiver_alpha: float = 0.7
[docs] colors: dict[str, str] = field( default_factory=lambda: { "max_velocity": "tab:blue", "density_ratio": "tab:orange", "avg_density": "tab:green", "total_mass": "tab:olive", "contact_angle_left": "tab:purple", "contact_angle_right": "tab:red", "contact_line_speed_left": "tab:brown", "contact_line_speed_right": "tab:pink", } )
[docs] DEFAULT_STYLE = FigureStyle()