API reference

andrey.viz.mpl.context#

andrey.viz.mpl.context(dark=False)[source]#

Return a context manager that applies the style within a with block.

Parameters:

dark (bool) – Select the dark palette instead of the light one.

Returns:

The result of matplotlib.rc_context: on exit it restores the previous rcParams, so styling one figure leaves the rest of the process untouched.

Return type:

Any

Raises:

ModuleNotFoundError – If matplotlib is not installed. Install the extra: pip install 'andrey-core[viz]'.