1

Ajoute jalons et variantes de heatmaps normalisées à l'étape 15

This commit is contained in:
2025-12-01 23:18:02 +01:00
parent 7a193136e5
commit 7fe02ea263
3 changed files with 46 additions and 10 deletions

View File

@@ -12,14 +12,16 @@ matplotlib.use("Agg")
def test_plot_translucent_share(tmp_path: Path) -> None:
"""Produit un graphique de part de translucides et diversité des couleurs."""
timeline_path = tmp_path / "colors_timeline.csv"
destination = tmp_path / "figures" / "step14" / "colors_translucent_share.png"
milestones_path = tmp_path / "milestones.csv"
destination = tmp_path / "figures" / "step15" / "colors_translucent_share.png"
timeline_path.write_text(
"year,colors_distinct,colors_new,colors_lost,share_translucent,total_quantity,top_colors\n"
"2020,2,2,0,0.25,100,Blue (60),Red (40)\n"
"2021,3,1,0,0.40,120,Blue (50),Trans-Black (48)\n"
)
milestones_path.write_text("year,description\n2020,Jalon Test\n")
plot_translucent_share(timeline_path, destination)
plot_translucent_share(timeline_path, milestones_path, destination)
assert destination.exists()
assert destination.stat().st_size > 0