boilercore_docs.format#

Formatting and display utilities.

Module Contents#

Functions#

disp_named

Display objects with names above them.

disp_free

Display free symbols.

disp

Display equation.

math_mod

Represent expression as LaTeX math.

manual_subplot_spacing

Context manager that allows custom spacing of subplots.

tex_wrap

Wrap column titles in LaTeX flags if they contain underscores ($).

handle_subscript

Wrap everything after the first underscore and replace others with commas.

add_unit

Append units to a quantity.

sep_unit

Split a quantity and its units.

API#

boilercore_docs.format.disp_named(
*args: tuple[Any, str],
)#

Display objects with names above them.

boilercore_docs.format.disp_free(
title,
eqn,
**kwargs,
)#

Display free symbols.

boilercore_docs.format.disp(
title,
*exprs,
**kwargs,
)#

Display equation.

boilercore_docs.format.math_mod(
expr,
long_frac_ratio=3,
**kwargs,
)#

Represent expression as LaTeX math.

boilercore_docs.format.manual_subplot_spacing()#

Context manager that allows custom spacing of subplots.

boilercore_docs.format.tex_wrap(
df: pandas.DataFrame,
) tuple[pandas.DataFrame, collections.abc.Mapping[str, str]]#

Wrap column titles in LaTeX flags if they contain underscores ($).

boilercore_docs.format.handle_subscript(
val: str,
) str#

Wrap everything after the first underscore and replace others with commas.

boilercore_docs.format.add_unit(
quantity: str,
units: str,
tex: bool = False,
) str#

Append units to a quantity.

boilercore_docs.format.sep_unit(
val: str,
) tuple[str, str]#

Split a quantity and its units.