“Ejemplo de Python Treemap” Código de respuesta

Ejemplo de Python Treemap

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()
Unsightly Unicorn

Ejemplo de Python Treemap

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

square_size = [10, 20, 30, 40, 50]
squarify.plot(square_size)
plt.show()
Unsightly Unicorn

Ejemplo de Python Treemap

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()
Unsightly Unicorn

Ejemplo de Python Treemap

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

square_sizes=[30, 40, 10, 60]
labels=["30", "40", "10", "60"]
squarify.plot(sizes=square_sizes, label=labels, alpha=0.6 )
plt.axis('off')
plt.show()
Unsightly Unicorn

Respuestas similares a “Ejemplo de Python Treemap”

Preguntas similares a “Ejemplo de Python Treemap”

Más respuestas relacionadas con “Ejemplo de Python Treemap” en Python

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código