From 50b7af86e15183b2681ad07bfbb5d7a85c47eada Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Tue, 2 Apr 2019 21:31:58 +0200 Subject: [PATCH] working sliders on line collection (force curve) --- rowers/interactiveplots.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index 86217e08..eb06995d 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -866,8 +866,8 @@ def interactive_forcecurve(theworkouts,workstrokesonly=True,plottype='scatter'): var multilines2 = sourcemultiline2.data var plottype = plottype - var multilinesx = multilines['xs'] - var multilinesy = multilines['ys'] + var multilinesx = multilines2['x'] + var multilinesy = multilines2['y'] var x = data['x'] var y = data['y'] @@ -914,8 +914,8 @@ def interactive_forcecurve(theworkouts,workstrokesonly=True,plottype='scatter'): datapoints['peakforceangle'] = [] datapoints['peakforce'] = [] - multilines['xs'] = [] - multilines['ys'] = [] + multilines['x'] = [] + multilines['y'] = [] for (i=0; i=minspm && spm1[i]<=maxspm) { @@ -926,10 +926,8 @@ def interactive_forcecurve(theworkouts,workstrokesonly=True,plottype='scatter'): datapoints['peakforce'].push(peakforce[i]) } if (plottype=='line') { - xs = [c[i],slip[i],peakforceangle[i],wash[i],finish[i]] - ys = [0,thresholdforce,peakforce[i],thresholdforce,finish[i]] - multilines['xs'].push(xs) - multilines['ys'].push(ys) + multilines['x'].push(multilinesx[i]) + multilines['y'].push(multilinesy[i]) } catchav += c[i] finishav += finish[i] @@ -967,6 +965,10 @@ def interactive_forcecurve(theworkouts,workstrokesonly=True,plottype='scatter'): peakflabel.text = 'Fpeak: '+peakforceav.toFixed(2) peakforceanglelabel.text = 'Peak angle: '+peakforceangleav.toFixed(2) annolabel.text = annotation + + console.log(count); + console.log(multilines['x'].length); + console.log(multilines['y'].length); // source.trigger('change'); source.change.emit();