You've already forked etude_lego_jurassic_world
Filtrer les sets sans minifigs dans le graphique step21
This commit is contained in:
@@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user