add lactate-ramp plot for activities and activity-comparison
This commit is contained in:
parent
806fdaad4d
commit
9de3a50780
1 changed files with 31 additions and 0 deletions
31
lactate-ramp.py
Normal file
31
lactate-ramp.py
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
metrics = GC.activityMetrics(compare=True)
|
||||
n_activities = len(metrics)
|
||||
|
||||
GC.setChart(title='Lactate-Ramp',
|
||||
type=GC.CHART_LINE,
|
||||
animate=False,
|
||||
legpos=GC_ALIGN_TOP,
|
||||
stack=False)
|
||||
|
||||
for i, metric in enumerate(metrics):
|
||||
date = metric[0]['date']
|
||||
color = metric[1]
|
||||
print(color)
|
||||
x = list(GC.xdataSeries('Lactate-Ramp', 'Power', compareindex=i))
|
||||
y = list(GC.xdataSeries('Lactate-Ramp', 'Lactate', compareindex=i))
|
||||
if not (x and y):
|
||||
continue
|
||||
GC.addCurve(name=str(date),
|
||||
x=x,
|
||||
y=y,
|
||||
xaxis='Power',
|
||||
yaxis='Lactate',
|
||||
color=color,
|
||||
line=GC_LINE_SOLID,
|
||||
symbol=GC_SYMBOL_CIRCLE,
|
||||
size=3,
|
||||
opacity=100,
|
||||
opengl=False)
|
||||
|
||||
GC.setAxis('Power', min=90, max=350, type=GC.AXIS_CONTINUOUS)
|
||||
GC.setAxis('Lactate', min=0.0, max=10.0, type=GC.AXIS_CONTINUOUS)
|
||||
Loading…
Reference in a new issue