dev.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#

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

Display objects with names above them.

dev.docs.format.disp_free(
title,
eqn,
**kwargs,
)#

Display free symbols.

dev.docs.format.disp(
title,
*exprs,
**kwargs,
)#

Display equation.

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

Represent expression as LaTeX math.

dev.docs.format.manual_subplot_spacing()#

Context manager that allows custom spacing of subplots.

dev.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 ($).

dev.docs.format.handle_subscript(
val: str,
) str#

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

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

Append units to a quantity.

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

Split a quantity and its units.