From 4b1599fcdf84361afeddba8628fc904b362eca17 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Mon, 9 Nov 2020 11:06:03 +0100 Subject: [PATCH] struggling with plot dimensions --- rowers/interactiveplots.py | 63 ++++++++++++++++++----------------- rowers/views/analysisviews.py | 2 +- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index cdbab280..4f12380f 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -779,7 +779,7 @@ def interactive_activitychart2(workouts,startdate,enddate,stack='type',toolbar_l window.location.href = links[index] """) - taptool.js_on_event('tap',callback) + taptool.js_on_event('tap',callback) script,div = components(p) @@ -1115,7 +1115,7 @@ def interactive_forcecurve(theworkouts,workstrokesonly=True,plottype='scatter'): ) plot = Figure(tools=TOOLS, - toolbar_sticky=False,toolbar_location="above") + toolbar_sticky=False,toolbar_location="above",plot_width=800,plot_height=600) # add watermark watermarkurl = "/static/img/logo7.png" @@ -1386,7 +1386,7 @@ def interactive_forcecurve(theworkouts,workstrokesonly=True,plottype='scatter'): multilines['x'] = [] multilines['y'] = [] - for (i=0; i=minspm && spm1[i]<=maxspm) { if (distance1[i]>=mindist && distance1[i]<=maxdist) { if (driveenergy1[i]>=minwork && driveenergy1[i]<=maxwork) { @@ -1451,40 +1451,40 @@ def interactive_forcecurve(theworkouts,workstrokesonly=True,plottype='scatter'): sourcemultiline.change.emit(); """) - annotation = TextInput(title="Type your plot notes here", value="") + annotation = TextInput(width=200, title="Type your plot notes here", value="") annotation.js_on_change('value',callback) callback.args["annotation"] = annotation - slider_spm_min = Slider(start=15.0, end=55,value=15.0, step=.1, + slider_spm_min = Slider(width=200, start=15.0, end=55,value=15.0, step=.1, title="Min SPM") slider_spm_min.js_on_change('value',callback) callback.args["minspm"] = slider_spm_min - slider_spm_max = Slider(start=15.0, end=55,value=55.0, step=.1, + slider_spm_max = Slider(width=200, start=15.0, end=55,value=55.0, step=.1, title="Max SPM") slider_spm_max.js_on_change('value',callback) callback.args["maxspm"] = slider_spm_max - slider_work_min = Slider(start=0, end=1500,value=0, step=10, + slider_work_min = Slider(width=200, start=0, end=1500,value=0, step=10, title="Min Work per Stroke") slider_work_min.js_on_change('value',callback) callback.args["minwork"] = slider_work_min - slider_work_max = Slider(start=0, end=1500,value=1500, step=10, + slider_work_max = Slider(width=200, start=0, end=1500,value=1500, step=10, title="Max Work per Stroke") slider_work_max.js_on_change('value',callback) callback.args["maxwork"] = slider_work_max distmax = 100+100*int(rowdata['distance'].max()/100.) - slider_dist_min = Slider(start=0,end=distmax,value=0,step=50, + slider_dist_min = Slider(width=200, start=0,end=distmax,value=0,step=50, title="Min Distance") slider_dist_min.js_on_change('value',callback) callback.args["mindist"] = slider_dist_min - slider_dist_max = Slider(start=0,end=distmax,value=distmax, + slider_dist_max = Slider(width=200, start=0,end=distmax,value=distmax, step=50, title="Max Distance") slider_dist_max.js_on_change('value',callback) @@ -1798,7 +1798,7 @@ def interactive_histoall(theworkouts,histoparam,includereststrokes, annolabel.text = annotation """) - annotation = TextInput(title="Type your plot notes here", value="") + annotation = TextInput(width=200, title="Type your plot notes here", value="") annotation.js_on_change('value',callback) callback.args["annotation"] = annotation @@ -4321,7 +4321,7 @@ def interactive_cum_flex_chart2(theworkouts,promember=0, data2['yname2'] = [] data2['spm'] = [] - for (i=0; i=minspm && spm1[i]<=maxspm) { if (distance1[i]>=mindist && distance1[i]<=maxdist) { if (driveenergy1[i]>=minwork && driveenergy1[i]<=maxwork) { @@ -4350,7 +4350,7 @@ def interactive_cum_flex_chart2(theworkouts,promember=0, ym1 /= data2['x1'].length ym2 /= data2['x1'].length - for (i=0; i=minspm && spm1[i]<=maxspm) { if (distance1[i]>=mindist && distance1[i]<=maxdist) { if (driveenergy1[i]>=minwork && driveenergy1[i]<=maxwork) { @@ -5355,7 +5356,7 @@ def interactive_flex_chart2(id,r,promember=0, ym1 /= data2['x1'].length ym2 /= data2['x1'].length - for (i=0; i