From 47f1ba38ec4a03f5d888ac7bdbd99e4bcbd5c020 Mon Sep 17 00:00:00 2001 From: Marc Arene <marc.arene@apc.in2p3.fr> Date: Sat, 23 May 2020 20:27:17 +0200 Subject: [PATCH] Sanity_check on labels to avoid potential latex error with underscores --- bilby/core/result.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bilby/core/result.py b/bilby/core/result.py index 4bff8e461..d967138c7 100644 --- a/bilby/core/result.py +++ b/bilby/core/result.py @@ -1123,15 +1123,16 @@ class Result(object): idxs = np.arange(nsteps) fig, axes = plt.subplots(nrows=ndim, figsize=(6, 3 * ndim)) walkers = self.walkers[:, :, :] + parameter_labels = sanity_check_labels(self.parameter_labels) for i, ax in enumerate(axes): ax.plot(idxs[:self.nburn + 1], walkers[:, :self.nburn + 1, i].T, lw=0.1, color='r') - ax.set_ylabel(self.parameter_labels[i]) + ax.set_ylabel(parameter_labels[i]) for i, ax in enumerate(axes): ax.plot(idxs[self.nburn:], walkers[:, self.nburn:, i].T, lw=0.1, color='k') - ax.set_ylabel(self.parameter_labels[i]) + ax.set_ylabel(parameter_labels[i]) fig.tight_layout() outdir = self._safe_outdir_creation(kwargs.get('outdir'), self.plot_walkers) -- GitLab