plot¶
- LeafTree.plot(*, width='distance', leaf_separation=0.8, cmap='viridis_r', colorbar=True, label_clusters=False, select_clusters=False, selection_palette='tab10', connect_line_kws=None, parent_line_kws=None, colorbar_kws=None, label_kws=None)¶
Creates an icicle plot of the leaf tree.
- Parameters:
width (
Literal['distance','density'], default:'distance') – Which cluster stability measure to use for the width of the segments. Can be one of “distance” or “density”, determining whether distance or density persistences are used. The stability measure sum the persistences over all points in the cluster. These persistences change with the minimum cluster size threshold, as that threshold determines the lowest distance at which enough points are connected to be considered a cluster.leaf_separation (
float, default:0.8) – A spacing parameter for icicle positioning.cmap (
str|Colormap, default:'viridis_r') – The colormap to use for the segments.colorbar (
bool, default:True) – Whether to show a colorbar for the cluster size.label_clusters (
bool, default:False) – If True, the cluster labels are plotted on the icicle segments.select_clusters (
bool, default:False) – If True, the segments representing selected clusters are highlighted with ellipses.selection_palette (
str|Colormap, default:'tab10') – A list of colors to highlight selected clusters.connect_line_kws (
dict[str,Any] |None, default:None) – Additional keyword arguments for the connecting lines between segments.parent_line_kws (
dict[str,Any] |None, default:None) – Additional keyword arguments for the parent lines connecting the segments to their parents.colorbar_kws (
dict[str,Any] |None, default:None) – Additional keyword arguments for the colorbar.label_kws (
dict[str,Any] |None, default:None) – Additional keyword arguments for the cluster labels.