1

Filtrer les sets sans minifigs dans le graphique step21

This commit is contained in:
2025-12-03 21:04:11 +01:00
parent 18d5895a05
commit 3c20b74b1c
3 changed files with 4 additions and 1 deletions

View File

@@ -16,7 +16,9 @@ def load_counts(path: Path) -> List[dict]:
def plot_minifigs_per_set(counts_path: Path, destination_path: Path) -> None:
"""Trace un diagramme en barres du nombre de minifigs par set (thèmes filtrés)."""
rows = load_counts(counts_path)
rows = [row for row in load_counts(counts_path) if int(row["minifig_count"]) > 0]
if not rows:
return
labels = [f"{row['set_num']} - {row['name']}" for row in rows]
values = [int(row["minifig_count"]) for row in rows]
positions = list(range(len(rows)))