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