You've already forked etude_lego_jurassic_world
Ajoute deux variantes de heatmap couleurs et pastilles alignées
This commit is contained in:
@@ -28,7 +28,8 @@ 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 = tmp_path / "figures" / "step14" / "colors_heatmap.png"
|
||||
destination_linear = tmp_path / "figures" / "step14" / "colors_heatmap_linear.png"
|
||||
destination_log = tmp_path / "figures" / "step14" / "colors_heatmap_log.png"
|
||||
matrix_path.write_text(
|
||||
"year,color_rgb,is_translucent,color_name,quantity_total\n"
|
||||
"2020,AAAAAA,false,Gray,5\n"
|
||||
@@ -37,7 +38,10 @@ def test_plot_colors_heatmap(tmp_path: Path) -> None:
|
||||
"2021,CCCCCC,false,Blue,4\n"
|
||||
)
|
||||
|
||||
plot_colors_heatmap(matrix_path, destination)
|
||||
plot_colors_heatmap(matrix_path, destination_linear, use_log_scale=False)
|
||||
plot_colors_heatmap(matrix_path, destination_log, use_log_scale=True)
|
||||
|
||||
assert destination.exists()
|
||||
assert destination.stat().st_size > 0
|
||||
assert destination_linear.exists()
|
||||
assert destination_linear.stat().st_size > 0
|
||||
assert destination_log.exists()
|
||||
assert destination_log.stat().st_size > 0
|
||||
|
||||
Reference in New Issue
Block a user