From c0897d02ea73de0929ef06b8d8f3353b23cfd7ee Mon Sep 17 00:00:00 2001 From: Samuel Hinton Date: Tue, 23 Jan 2024 08:43:53 +1000 Subject: [PATCH] Fixing bug in label not showing for title summary text --- .pre-commit-config.yaml | 2 +- src/chainconsumer/plotter.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 16606c18..e82621c5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: - --unsafe - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.4 + rev: v0.1.14 hooks: - id: ruff args: ["--fix", "--no-unsafe-fixes"] diff --git a/src/chainconsumer/plotter.py b/src/chainconsumer/plotter.py index 41f34ac9..f814bd47 100644 --- a/src/chainconsumer/plotter.py +++ b/src/chainconsumer/plotter.py @@ -972,9 +972,10 @@ def _plot_bars( ) if summary: t = self.parent.analysis.get_parameter_text(fit_values) + label = self.config.get_label(column) if isinstance(column, str): ax.set_title( - r"${} = {}$".format(column.strip("$"), t), fontsize=self.config.summary_font_size + r"${} = {}$".format(label.strip("$"), t), fontsize=self.config.summary_font_size ) else: ax.set_title(r"$%s$" % t, fontsize=self.config.summary_font_size)