1

Réorganise les visuels de l'étape 15 sous figures/step15

This commit is contained in:
2025-12-01 23:15:59 +01:00
parent 8a0648ae85
commit feb567d01e
8 changed files with 36 additions and 11 deletions

View File

@@ -28,8 +28,9 @@ def test_plot_translucent_share(tmp_path: Path) -> None:
def test_plot_colors_heatmap(tmp_path: Path) -> None:
"""Génère une heatmap année × couleur."""
matrix_path = tmp_path / "colors_year_color_matrix.csv"
destination_linear = tmp_path / "figures" / "step14" / "colors_heatmap_linear.png"
destination_log = tmp_path / "figures" / "step14" / "colors_heatmap_log.png"
destination_linear = tmp_path / "figures" / "step15" / "colors_heatmap_linear.png"
destination_log = tmp_path / "figures" / "step15" / "colors_heatmap_log.png"
destination_share = tmp_path / "figures" / "step15" / "colors_heatmap_share.png"
matrix_path.write_text(
"year,color_rgb,is_translucent,color_name,quantity_total\n"
"2020,AAAAAA,false,Gray,5\n"
@@ -40,8 +41,11 @@ def test_plot_colors_heatmap(tmp_path: Path) -> None:
plot_colors_heatmap(matrix_path, destination_linear, use_log_scale=False)
plot_colors_heatmap(matrix_path, destination_log, use_log_scale=True)
plot_colors_heatmap(matrix_path, destination_share, normalize_by_year=True)
assert destination_linear.exists()
assert destination_linear.stat().st_size > 0
assert destination_log.exists()
assert destination_log.stat().st_size > 0
assert destination_share.exists()
assert destination_share.stat().st_size > 0