bundles / scipy 1.17.1 / scipy / cluster / hierarchy / _dendrogram_calculate_info
function
scipy.cluster.hierarchy:_dendrogram_calculate_info
Signature
def _dendrogram_calculate_info ( Z , p , truncate_mode , color_threshold = inf , get_leaves = True , orientation = top , labels = None , count_sort = False , distance_sort = False , show_leaf_counts = False , i = -1 , iv = 0.0 , ivl = None , n = 0 , icoord_list = None , dcoord_list = None , lvs = None , mhr = False , current_color = None , color_list = None , currently_below_threshold = None , leaf_label_func = None , level = 0 , contraction_marks = None , link_color_func = None , above_threshold_color = C0 ) Summary
Calculate the endpoints of the links as well as the labels for the the dendrogram rooted at the node with index i. iv is the independent variable value to plot the left-most leaf node below the root node i (if orientation='top', this would be the left-most x value where the plotting of this root node i and its descendents should begin).
Extended Summary
ivl is a list to store the labels of the leaf nodes. The leaf_label_func is called whenever ivl != None, labels == None, and leaf_label_func != None. When ivl != None and labels != None, the labels list is used only for labeling the leaf nodes. When ivl == None, no labels are generated for leaf nodes.
When get_leaves==True, a list of leaves is built as they are visited in the dendrogram.
Returns a tuple with l being the independent variable coordinate that corresponds to the midpoint of cluster to the left of cluster i if i is non-singleton, otherwise the independent coordinate of the leaf node if i is a leaf node.
Returns
: A tuple (left, w, h, md), where:left is the independent variable coordinate of the center of the the U of the subtree
w is the amount of space used for the subtree (in independent variable units)
h is the height of the subtree in dependent variable units
md is the
max(Z[*,2]) for all nodes*below and including the target node.
Aliases
-
scipy.cluster.hierarchy._dendrogram_calculate_info