a bit more expressiveness
This commit is contained in:
@ -7,13 +7,13 @@ class MDISubPlot(MDISubWindow):
|
||||
|
||||
def __init__(self, name, desc, *args, **kwargs):
|
||||
super().__init__(name, *args, **kwargs)
|
||||
pw = pg.PlotWidget()
|
||||
self.setWidget(pw)
|
||||
|
||||
style = pg_plot_style()
|
||||
|
||||
plt = pg.PlotWidget()
|
||||
plot = desc.make_plot(plt, style)
|
||||
plot = desc.make_plot(pw, style)
|
||||
self.plots = {name: plot}
|
||||
self.setWidget(plt)
|
||||
|
||||
|
||||
|
||||
@ -21,14 +21,14 @@ class MDISubMultiPlot(MDISubWindow):
|
||||
|
||||
def __init__(self, name, descs, *args, **kwargs):
|
||||
super().__init__(name, *args, **kwargs)
|
||||
pw = pg.PlotWidget()
|
||||
self.setWidget(pw)
|
||||
|
||||
ls = pg_legend_style()
|
||||
psc = pg_plot_style_cycler()
|
||||
|
||||
plt = pg.PlotWidget()
|
||||
plt.addLegend(**ls)
|
||||
self.plots = {n: d.make_plot(plt, s) for (n, d), s in zip(descs.items(), psc)}
|
||||
self.setWidget(plt)
|
||||
pw.addLegend(**ls)
|
||||
self.plots = {name: desc.make_plot(pw, style) for (name, desc), style in zip(descs.items(), psc)}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user