Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python treemap example

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

sqaure_sizes=[10, 30, 50, 200]
labels=["A", "B", "C", "D"]
colors=['red','blue','green','yellow']
squarify.plot(sizes=sqaure_sizes, label=labels, color=colors, alpha=0.7 )
plt.axis('off')
plt.show()
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #python #treemap
ADD COMMENT
Topic
Name
2+4 =