Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to draw dendrogram in python

>>> from scipy.cluster import hierarchy
>>> import matplotlib.pyplot as plt
Comment

how to draw dendrogram in python

>>> hierarchy.set_link_color_palette(['m', 'c', 'y', 'k'])
>>> fig, axes = plt.subplots(1, 2, figsize=(8, 3))
>>> dn1 = hierarchy.dendrogram(Z, ax=axes[0], above_threshold_color='y',
...                            orientation='top')
>>> dn2 = hierarchy.dendrogram(Z, ax=axes[1],
...                            above_threshold_color='#bcbddc',
...                            orientation='right')
>>> hierarchy.set_link_color_palette(None)  # reset to default after use
>>> plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: automl classification tutorial sklearn 
Python :: python requests insecure request warning 
Python :: python construct a string 
Python :: dataclass in python 
Python :: assign multiple columns pandas 
Python :: how to print a value of a key in nested dictionary python 
Python :: pandas convert string to float 
Python :: re.search variable 
Python :: np.random.choice 
Python :: model.predict python 
Python :: protected class python 
Python :: python write column csv 
Python :: scrape website with login python selenium 
Python :: upper python python.org 
Python :: # /usr/bin/env python windows 
Python :: how to save plot in matplotlib 
Python :: splitting strings in python 
Python :: python trace table 
Python :: odoo model 
Python :: python classes and objects 
Python :: remove emoji 
Python :: create tuples in pandas 
Python :: python inline if 
Python :: looping over lists in python 
Python :: python local nosql database 
Python :: conv2d default stride 
Python :: python string first letter uppercase and second letter in lowercase 
Python :: pandas get rows which are NOT in other dataframe 
Python :: get parent of current directory python 
Python :: python file exists 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =