fixed axis labels
This commit is contained in:
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user