Note
Go to the end to download the full example code.
Default colorΒΆ
The default color is applied to parts of a dendrogram that do not belong to any subtrees. By
default, it is the first color of the colorway attribute of
the layout attribute of a figure. This can be changed using
the default_color parameter.
import plotly.graph_objects as go
import plotly.io as pio
import scipy
from pdendro import attach_dendrogram
X = [[0.0], [1.0], [3.0], [6.0]]
Z = scipy.cluster.hierarchy.linkage(X)
fig = go.Figure()
attach_dendrogram(fig, Z, default_color="#000000")
pio.show(fig)