Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python treemap example

import matplotlib.pyplot as plt
import squarify
import pandas as pd

square_sizes=[10, 40, 20, 70]
labels=["10", "40", "20", "70"]
colors=['purple','orange','blue','green']
squarify.plot(sizes=square_sizes, label=labels, color=colors, alpha=0.6 )
plt.axis('off')
plt.show()
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #python #treemap
ADD COMMENT
Topic
Name
6+6 =