From 5062f444f191d0bc0bac8e68674e387cffcd531f Mon Sep 17 00:00:00 2001 From: Gemma Fardell <47746591+gfardell@users.noreply.github.com> Date: Fri, 26 Aug 2022 15:21:02 +0100 Subject: [PATCH] fix angle display precision and matplotlib warning (#1354) --- Wrappers/Python/cil/utilities/display.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Wrappers/Python/cil/utilities/display.py b/Wrappers/Python/cil/utilities/display.py index 60e554263a..d37c4633a1 100644 --- a/Wrappers/Python/cil/utilities/display.py +++ b/Wrappers/Python/cil/utilities/display.py @@ -358,8 +358,8 @@ def __show2D(self,datacontainers, title=None, slice_list=None, fix_range=False, ang = subplot.data.geometry.config.angles - labels_new = [str(i) for i in np.take(ang.angle_data, location_new)] - axes[i].set_yticklabels(labels_new) + labels_new = ["{:.2f}".format(i) for i in np.take(ang.angle_data, location_new)] + axes[i].set_yticks(location_new, labels=labels_new) axes[i].set_ylabel('angle / ' + str(ang.angle_unit))