From 4a43cc6faa14de221e1bc7c4fcf168f6372f7954 Mon Sep 17 00:00:00 2001 From: jacoterh <54140851+jacoterh@users.noreply.github.com> Date: Fri, 24 Jan 2025 10:28:15 +0100 Subject: [PATCH] adding logo to contour cornerplot --- src/smefit/analyze/coefficients_utils.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/smefit/analyze/coefficients_utils.py b/src/smefit/analyze/coefficients_utils.py index 642a5b52..57dd4cbe 100644 --- a/src/smefit/analyze/coefficients_utils.py +++ b/src/smefit/analyze/coefficients_utils.py @@ -888,7 +888,7 @@ def plot_contours_2d( # in case n_par > 2, put legend outside subplot if n_par > 2: - ax = fig.add_subplot(grid[0, -1]) + ax = fig.add_subplot(grid[0, 1]) ax.axis("off") ax.legend( @@ -903,11 +903,19 @@ def plot_contours_2d( title_fontsize=24, ) - ax.set_title( - rf"$\mathrm{{Marginalised}}\:{cl}\:\%\:\mathrm{{C.L.\:intervals}}$", - fontsize=18, + ax_logo = fig.add_subplot(grid[0, -1]) + ax_logo.axis("off") + self._plot_logo(ax_logo, extent=[0.05, 0.95, 0.7, 1]) + + ax.text( + 0.05, + 0.95, + rf"$\mathrm{{Marginalised}}\:{cl}\:\%\:\mathrm{{C.I.\:intervals}}$", + fontsize=24, + transform=ax.transAxes, + verticalalignment="top", ) - grid.tight_layout(fig) + fig.savefig(f"{self.report_folder}/contours_2d.pdf") fig.savefig(f"{self.report_folder}/contours_2d.png")