add function to compare result of two experiment

This commit is contained in:
Jean-Marie Mineau 2025-09-07 17:08:42 +02:00
parent 1309d7ea24
commit 0d8ad49c94
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2
5 changed files with 255 additions and 11 deletions

View file

@ -112,7 +112,11 @@ def radar_chart(
def render(
title: str, interactive: bool, image_path: Path | None, tight_layout: bool = True
title: str,
interactive: bool,
image_path: Path | None,
tight_layout: bool = True,
format: str = "pdf",
):
"""Render the figure. If `interactive`, display if, if `image_path`, save it."""
# plt.title(title)
@ -121,7 +125,7 @@ def render(
if image_path is not None:
if not image_path.exists():
image_path.mkdir(parents=True, exist_ok=True)
plt.savefig(image_path / (slugify(title) + ".pdf"), format="pdf")
plt.savefig(image_path / (slugify(title) + "." + format), format=format)
if interactive:
plt.show()
plt.close()