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:
parent
53798b6465
commit
9340f19ba2
@ -151,15 +151,16 @@ for cur in ax:
|
|||||||
cur.addLegend(offset = (-1, 1))
|
cur.addLegend(offset = (-1, 1))
|
||||||
for e in G.sevents:
|
for e in G.sevents:
|
||||||
cur = ax[1 if e.type == "value" else 0]
|
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}
|
args = {'name': e.name,'antialias':True}
|
||||||
|
color = mkColor(colors[G.curveno[cur] % len(colors)])
|
||||||
if e.type == "event-signal":
|
if e.type == "event-signal":
|
||||||
args['symbol'] = e.marker
|
args['symbol'] = e.marker
|
||||||
args['pen'] = None
|
args['symbolBrush'] = pg.mkBrush(color, width=0)
|
||||||
else:
|
else:
|
||||||
if not cur in G.curveno:
|
args['pen'] = pg.mkPen(color, width=0)
|
||||||
G.curveno[cur] = 0
|
G.curveno[cur] += 1
|
||||||
args['pen'] = pg.mkPen(mkColor(colors[G.curveno[cur] % len(colors)]), width=0)
|
|
||||||
G.curveno[cur] += 1
|
|
||||||
n = cur.plot([x for x,y in e.vals], [y for x,y in e.vals], **args)
|
n = cur.plot([x for x,y in e.vals], [y for x,y in e.vals], **args)
|
||||||
|
|
||||||
QtGui.QApplication.instance().exec_()
|
QtGui.QApplication.instance().exec_()
|
||||||
|
Loading…
Reference in New Issue
Block a user