laserson / squarify

Pure Python implementation of the squarify treemap layout algorithm
Other
297 stars 37 forks source link

AttributeError: module 'squarify' has no attribute 'plot' #26

Closed ghost closed 3 years ago

ghost commented 3 years ago

Any idea why I receive the error AttributeError: module 'squarify' has no attribute 'plot'?

import matplotlib.pyplot as plt
import squarify

squarify.plot(
    sizes=[13,22,35,5],
    label=["group A", "group B", "group C", "group D"],
    )

plt.axis('off')
plt.show()
laserson commented 3 years ago

Unfortunately I can't reproduce this error. Perhaps you can try in a fresh virtualenv or conda environment?

ghost commented 3 years ago

Hello Uri, I jsut resolved this problem. Sorry for not closing this issue. The name of my file was squarify.py. After renaming the file, it worked!

Thanks for Squarify! It's a great package!! :)