[bugfix] error when there is nothing to plot
This commit is contained in:
parent
0320ad67b9
commit
36a4f0df8a
5
PyLoT.py
5
PyLoT.py
@ -1903,8 +1903,9 @@ class MainWindow(QMainWindow):
|
|||||||
self.plot_method = 'fast'
|
self.plot_method = 'fast'
|
||||||
else:
|
else:
|
||||||
self.plot_method = 'normal'
|
self.plot_method = 'normal'
|
||||||
plots, gaps = plotWidget.plotWFData(wfdata=wfst, wfsyn=wfsyn, title=title, mapping=False, component=comp,
|
rval = plotWidget.plotWFData(wfdata=wfst, wfsyn=wfsyn, title=title, mapping=False, component=comp,
|
||||||
nth_sample=int(nth_sample), method=self.plot_method)
|
nth_sample=int(nth_sample), method=self.plot_method)
|
||||||
|
plots, gaps = rval if rval else ([], [])
|
||||||
return plots, gaps
|
return plots, gaps
|
||||||
|
|
||||||
def adjustPlotHeight(self):
|
def adjustPlotHeight(self):
|
||||||
|
@ -447,6 +447,10 @@ class WaveformWidgetPG(QtGui.QWidget):
|
|||||||
self.orig_parent = parent
|
self.orig_parent = parent
|
||||||
# attribute plotdict is a dictionary connecting position and a name
|
# attribute plotdict is a dictionary connecting position and a name
|
||||||
self.plotdict = dict()
|
self.plotdict = dict()
|
||||||
|
# init labels
|
||||||
|
self.xlabel = None
|
||||||
|
self.ylabel = None
|
||||||
|
self.title = None
|
||||||
# create plot
|
# create plot
|
||||||
self.main_layout = QtGui.QVBoxLayout()
|
self.main_layout = QtGui.QVBoxLayout()
|
||||||
self.label_layout = QtGui.QHBoxLayout()
|
self.label_layout = QtGui.QHBoxLayout()
|
||||||
|
Loading…
Reference in New Issue
Block a user