1
mirror of https://github.com/mpv-player/mpv synced 2024-11-03 03:19:24 +01:00

TOOLS/stats-conv.py: use different colors for symbols too

Also, not setting pen=None seems to draw horizontal lines for the dots,
which is fine too.
This commit is contained in:
wm4 2016-10-06 18:00:23 +02:00
parent 53798b6465
commit 9340f19ba2

View File

@ -151,15 +151,16 @@ for cur in ax:
cur.addLegend(offset = (-1, 1))
for e in G.sevents:
cur = ax[1 if e.type == "value" else 0]
if not cur in G.curveno:
G.curveno[cur] = 0
args = {'name': e.name,'antialias':True}
color = mkColor(colors[G.curveno[cur] % len(colors)])
if e.type == "event-signal":
args['symbol'] = e.marker
args['pen'] = None
args['symbolBrush'] = pg.mkBrush(color, width=0)
else:
if not cur in G.curveno:
G.curveno[cur] = 0
args['pen'] = pg.mkPen(mkColor(colors[G.curveno[cur] % len(colors)]), width=0)
G.curveno[cur] += 1
args['pen'] = pg.mkPen(color, width=0)
G.curveno[cur] += 1
n = cur.plot([x for x,y in e.vals], [y for x,y in e.vals], **args)
QtGui.QApplication.instance().exec_()