CADETProcess.plotting.setup_figure

Contents

CADETProcess.plotting.setup_figure#

CADETProcess.plotting.setup_figure(layout: Literal['1_col', '1_5_col', '2_col'] = '1_col', nrows: int = 1, ncols: int = 1, aspect: float | None = None, scale_with_subplots: bool = False, padding: float = 0.0, figsize: tuple[float, float] | None = None, *args: Any, **kwargs: Any) tuple[Figure, Axes | ndarray[tuple[Any, ...], dtype[Axes]]][source]#

Set up a matplotlib figure with local styling and flexible options.

Parameters:
layoutLiteral[“1_col”, “1_5_col”, “2_col”] = “1_col”,

Figure layout.

nrowsint

Number of subplot rows.

ncolsint

Number of subplot columns.

aspectfloat | None

Width / height ratio. If provided, overrides preset height.

scale_with_subplots: bool = False

If True, scale figure size by ncols/nrows.

paddingfloat

Extra inches to add.

figsizetuple[float, float] | None

Override width/height directly.

*args

Additional arguments for plt.subplots.

**kwargs

Additional keyword arguments for plt.subplots.

Returns:
tuple[plt.Figure, plt.Axes | npt.NDArray[plt.Axes]]

Figure and Axes object(s).