From 291300e1b36700714ada6b007749d7d65913a72f Mon Sep 17 00:00:00 2001 From: Jerome Kieffer Date: Thu, 5 Oct 2023 09:01:30 +0200 Subject: [PATCH] close #1967 --- pyFAI/gui/tasks/IntegrationTask.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pyFAI/gui/tasks/IntegrationTask.py b/pyFAI/gui/tasks/IntegrationTask.py index f393fcfa2..9484e3379 100644 --- a/pyFAI/gui/tasks/IntegrationTask.py +++ b/pyFAI/gui/tasks/IntegrationTask.py @@ -25,7 +25,7 @@ __authors__ = ["V. Valls", "J. Kieffer"] __license__ = "MIT" -__date__ = "05/09/2023" +__date__ = "05/10/2023" import logging import numpy @@ -839,7 +839,12 @@ def compute_location(result): scale=(scaleX, scaleY), colormap=colormap, resetzoom=False) - self.__plot2d.setGraphXLabel(result2d.unit.label) + unit = result2d.unit + if isinstance(unit, (tuple, list)) and len(unit) == 2: + self.__plot2d.setGraphXLabel(unit[0].label) + self.__plot2d.setGraphYLabel(unit[1].label) + else: + self.__plot2d.setGraphXLabel(unit.label) self.__radialUnit = integrationProcess.radialUnit() self.__wavelength = integrationProcess.wavelength()