PublicationTheme#
- class braincell.vis.PublicationTheme(branch_type_colors=<factory>, branch_type_edge_colors_2d=None, rc_params=<factory>, alpha_2d=0.7, frustum_edge_linewidth_2d=0.9, alpha_3d_tube=1.0)[source]#
Publication-quality styling preset for
braincell.vis.Bundles a
VisDefaultsdiff (serif-friendly branch colours, thicker strokes) with a matplotlibrcParamsblock so a single context manager flips both at once.- Parameters:
branch_type_colors (
dict[str,tuple[int,int,int]]) – Branch-type colour overrides shared by 2D and 3D. Defaults toPUBLICATION_BRANCH_TYPE_COLORS.branch_type_edge_colors_2d (
dict[str,tuple[int,int,int]] |None) – Optional 2D frustum border colour overrides. WhenNone, border colours are derived automatically from the fill colours.rc_params (
dict[str,object]) – MatplotlibrcParamsapplied inside the theme. Defaults toPUBLICATION_RC_PARAMS.alpha_2d (
float) – Shared 2D opacity used by both line and frustum rendering.frustum_edge_linewidth_2d (
float) – Border linewidth used by 2D frustum rendering.alpha_3d_tube (
float) – Tube alpha used by the 3D backend. Defaults to1.0.
Examples
>>> from braincell.vis import publication_theme, plot2d >>> with publication_theme(): ... plot2d(tree, layout='stem')