fixed axis labels

This commit is contained in:
2023-05-12 14:28:40 +02:00
parent ae70ac86a8
commit 0742b9de0f
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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