From 9de3a507808ace76793b2adb4d48a96f8bef230b Mon Sep 17 00:00:00 2001 From: Thies Lennart Alff Date: Sun, 6 Aug 2023 11:33:30 +0200 Subject: [PATCH] add lactate-ramp plot for activities and activity-comparison --- lactate-ramp.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 lactate-ramp.py diff --git a/lactate-ramp.py b/lactate-ramp.py new file mode 100644 index 0000000..51b7c3d --- /dev/null +++ b/lactate-ramp.py @@ -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)