theme#
- class braintools.visualize.morphology.theme(**overrides)[source]#
Temporarily override visualization defaults for the duration of a block.
All keyword arguments are forwarded to
configure_defaults(). On exit the previous defaults are restored, even if the block raised.- Parameters:
**overrides (
object) – Any keyword accepted byconfigure_defaults(), e.g.layout_2d_default,branch_type_colors,alpha_2d_line,highlight_color.- Yields:
VisDefaults – A snapshot of the effective defaults inside the
withblock.
Examples
>>> from braintools.visualize.morphology import get_defaults, theme >>> with theme(alpha_2d=0.5) as inside: ... inside.alpha_2d 0.5 >>> get_defaults().alpha_2d 0.8