depictr.dendrogram_plot#
- depictr.dendrogram_plot(data, cols=None, method='ward', title=None)#
Hierarchical-clustering dendrogram drawn from a scipy linkage.
The linkage is computed by scipy and the dendrogram coordinates it returns are redrawn as line segments under the depictr theme, so the tree matches the rest of the figure set. Leaves are not labelled, since the intent is to read the overall merge structure rather than individual observations.
- Parameters:
data (pandas.DataFrame)
cols (list of str, optional) – Numeric columns to cluster on; defaults to all numeric columns.
method (str) – Linkage method passed to
scipy.cluster.hierarchy.linkage()(for example"ward","average","complete").title (str, optional)
- Return type:
plotnine.ggplot