Stücke
Stücke

Reputation: 1043

What is this type of plot called?

What is this type of plot called and is there a way to implement it in matplotlib or seaborn?

enter image description here

Source: https://oec.world/en/profile/country/tkm

Upvotes: 1

Views: 59

Answers (1)

Stef
Stef

Reputation: 30579

It's called a Tree map. You can create it with squarify.

Example:

import matplotlib.pyplot as plt
import squarify

squarify.plot(sizes=[13,22,35,5], label=["group A", "group B", "group C", "group D"], alpha=.7 )
plt.axis('off')
plt.show()

enter image description here

Upvotes: 4

Related Questions