Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save EnkrateiaLucca/02c8decff4d0679fd499cc7f6a43522d to your computer and use it in GitHub Desktop.
Save EnkrateiaLucca/02c8decff4d0679fd499cc7f6a43522d to your computer and use it in GitHub Desktop.
import matplotlib.pyplot as plt
import seaborn as sns
sns.set()
import squarify
# Sample data (sizes of rectangles)
sizes = [500, 300, 200, 100]
# Labels for the rectangles (optional)
labels = ["A", "B", "C", "D"]
# Plotting the treemap
plt.subplot(1,3,1)
squarify.plot(sizes=sizes, label=labels, alpha=0.8, color=["red", "green", "blue", "grey"])
plt.title("LLM Document Space")
plt.axis('off') # Turn off axis
plt.subplot(1,3,2)
plt.plot([], [])
plt.xlim(0,10)
plt.ylim(0,10)
plt.axis("off")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment