slightly nicer logic using LINE_STYLE_CYCLE instead of LINE_COLORS

This commit is contained in:
2023-01-08 13:16:37 +01:00
parent 3eb635a0d8
commit 59948f5b22

View File

@ -14,8 +14,7 @@ class MDISubPlot(MDISubWindow):
from itertools import cycle
from ..theme import LINE_COLORS
from ..theme import LINE_STYLE_CYCLE
class MDISubMultiPlot(MDISubWindow):
@ -25,14 +24,8 @@ class MDISubMultiPlot(MDISubWindow):
super().__init__(title, *args, **kwargs)
plt = pg.PlotWidget()
self.plots = [d.make_plot(plt) for d in descs]
self.plots = [d.make_plot(plt, style=s) for d, s in zip(descs, LINE_STYLE_CYCLE)]
self.setWidget(plt)
cc = cycle(LINE_COLORS)
for p, c in zip(self.plots, cc):
#TODO: this overwrites the line width, etc.
p.setPen(c)
p.setSymbolBrush(c)