made MDISubMultiPlot input descs and .plots dicts
This commit is contained in:
@ -113,8 +113,8 @@ class MainWindow(QMainWindow):
|
||||
|
||||
def plot_multiple_items(self, items):
|
||||
#TODO: unset alarm status for all items?
|
||||
pairs = ((i.key, i.value) for i in items)
|
||||
names, descs = zip(*pairs)
|
||||
descs = {i.key: i.value for i in items}
|
||||
names = descs.keys()
|
||||
name = " | ".join(names)
|
||||
self.activate_or_make_subwin(MDISubMultiPlot, name, descs)
|
||||
|
||||
|
@ -26,7 +26,7 @@ class MDISubMultiPlot(MDISubWindow):
|
||||
|
||||
plt = pg.PlotWidget()
|
||||
plt.addLegend(**ls)
|
||||
self.plots = [d.make_plot(plt, s) for d, s in zip(descs, psc)]
|
||||
self.plots = {n: d.make_plot(plt, s) for (n, d), s in zip(descs.items(), psc)}
|
||||
self.setWidget(plt)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user