From 0742b9de0f96ab5310844de633c0066046e17ea1 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Fri, 12 May 2023 14:28:40 +0200 Subject: [PATCH] fixed axis labels --- grum/descs/imgdesc.py | 4 ++-- grum/mdi/mdisubimg.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/grum/descs/imgdesc.py b/grum/descs/imgdesc.py index be990ec..599eeb6 100644 --- a/grum/descs/imgdesc.py +++ b/grum/descs/imgdesc.py @@ -34,10 +34,10 @@ class ImageDescription(Description): plotwidget.setTitle(self.title) if self.xlabel: - plotwidget.setLabel("bottom", self.xlabel) + plotwidget.getView().setLabel("bottom", self.xlabel) if self.ylabel: - plotwidget.setLabel("left", self.ylabel) + plotwidget.getView().setLabel("left", self.ylabel) return res diff --git a/grum/mdi/mdisubimg.py b/grum/mdi/mdisubimg.py index a3adce1..9f78974 100644 --- a/grum/mdi/mdisubimg.py +++ b/grum/mdi/mdisubimg.py @@ -7,7 +7,7 @@ class MDISubImage(MDISubWindow): def __init__(self, name, desc, *args, **kwargs): super().__init__(name, *args, **kwargs) - self.pw = pw = pg.ImageView() + self.pw = pw = pg.ImageView(view=pg.PlotItem()) # for axis ticks and labels, view needs to be a PlotItem self.setWidget(pw) # connect to plot mouse-over event