braincell.vis.theme

Contents

braincell.vis.theme#

braincell.vis.theme(**overrides)[source]#

Temporarily override visualization defaults for the duration of a block.

All keyword arguments are forwarded to configure(). On exit the previous defaults are restored, even if the block raised.

Parameters:

**overrides (object) – Any keyword accepted by configure(), e.g. layout_2d_default, branch_type_colors, alpha_2d_line, highlight_color.

Yields:

VisDefaults – A snapshot of the effective defaults inside the with block.

Examples

>>> import braincell
>>> with braincell.vis.theme(branch_type_colors={"axon": "#ff0000"}):
...     morpho.vis2d()
>>> morpho.vis2d()