bdendro.subtree_cmap function¶
- bdendro.subtree_cmap(dendrogram, palette, default_color=None, skip_single=True)[source]¶
Make a mapping from a subtree label to a color.
- Parameters:
dendrogram (bokeh.models.GraphRenderer) – Renderer returned by
bdendro.dendrogram_rendererfunction.palette (Sequence[str]) – Colors of subtrees. If
default_colorisNone, the first item is removed and used for it.default_color (str or None, optional) – Default color of a tree. If
None, the first item ofpaletteis removed and used for this.skip_single (bool, optional) – If
True, a subtree consisting of a single node is colored withdefault_color.
- Returns:
cmap (bokeh.core.property.vectorization.Field) – Mapping from a subtree label to a color.