adding axis labels to instroke plots for Quiske
This commit is contained in:
@@ -7,7 +7,7 @@ from scipy.stats import linregress, percentileofscore
|
||||
from pytz import timezone as tz, utc
|
||||
from rowers.models import course_spline, VirtualRaceResult, InStrokeAnalysis, ForceCurveAnalysis
|
||||
from bokeh.palettes import Category20c, Category10
|
||||
from bokeh.layouts import layout, widgetbox
|
||||
from bokeh.layouts import layout
|
||||
from bokeh.resources import CDN, INLINE
|
||||
from rowers.dataprep import timedeltaconv
|
||||
from pandas.core.groupby.groupby import DataError
|
||||
@@ -1275,7 +1275,7 @@ def interactive_forcecurve(theworkouts, workstrokesonly=True, plottype='scatter'
|
||||
plot.xaxis.axis_label = "Angle"
|
||||
plot.yaxis.axis_label = "Force (N)"
|
||||
plot.title.text = theworkouts[0].name
|
||||
plot.title.text_font_size = value("1.0em")
|
||||
plot.title.text_font_size = "1.0em"
|
||||
|
||||
yrange1 = Range1d(start=0, end=900)
|
||||
plot.y_range = yrange1
|
||||
@@ -4017,7 +4017,7 @@ def interactive_windchart(id=0, promember=0):
|
||||
plot.line('dist', 'tw', source=source,
|
||||
legend_label="Tail (+)/Head (-) Wind (m/s)", color='black')
|
||||
plot.title.text = row.name
|
||||
# plot.title.text_font_size=value("1.0em")
|
||||
# plot.title.text_font_size="1.0em"
|
||||
plot.title.text_font = "1.0em"
|
||||
plot.xaxis.axis_label = "Distance (m)"
|
||||
plot.yaxis.axis_label = "Wind Speed (m/s)"
|
||||
@@ -4084,7 +4084,7 @@ def interactive_streamchart(id=0, promember=0):
|
||||
)
|
||||
plot.line(dist, vstream, legend_label="River Stream Velocity (m/s)")
|
||||
plot.title.text = row.name
|
||||
plot.title.text_font_size = value("1.0em")
|
||||
plot.title.text_font_size = "1.0em"
|
||||
plot.xaxis.axis_label = "Distance (m)"
|
||||
plot.yaxis.axis_label = "River Current (m/s)"
|
||||
plot.y_range = Range1d(-2, 2)
|
||||
@@ -4456,6 +4456,18 @@ def instroke_interactive_chart(df,metric, workout, spm_min, spm_max,
|
||||
|
||||
plot.add_tools(HoverTool(tooltips=TIPS))
|
||||
|
||||
if metric == 'boat accelerator curve':
|
||||
plot.yaxis.axis_label = "Boat acceleration (m/s^2)"
|
||||
elif metric == 'instroke boat speed':
|
||||
plot.yaxis.axis_label = "Boat Speed (m/s)"
|
||||
vavg = mean_vals.median()
|
||||
elif metric == 'oar angle velocity curve':
|
||||
plot.yaxis.axis_label = "Oar Angular Velocity (degree/s)"
|
||||
elif metric == 'seat curve':
|
||||
plot.yaxis.axis_label = "Seat Speed (m/s)"
|
||||
|
||||
plot.xaxis.axis_label = 'Time (%)'
|
||||
|
||||
try:
|
||||
script, div = components(plot)
|
||||
except ValueError:
|
||||
@@ -4526,7 +4538,7 @@ def interactive_chart(id=0, promember=0, intervaldata={}):
|
||||
|
||||
plot.line('time', 'pace', source=source, legend_label="Pace", name="pace")
|
||||
plot.title.text = row.name
|
||||
plot.title.text_font_size = value("1.0em")
|
||||
plot.title.text_font_size = "1.0em"
|
||||
plot.sizing_mode = 'stretch_both'
|
||||
plot.xaxis.axis_label = "Time"
|
||||
plot.yaxis.axis_label = "Pace (/500m)"
|
||||
@@ -4825,7 +4837,7 @@ def interactive_multiflex(datadf, xparam, yparam, groupby, extratitle='',
|
||||
plot.extra_x_ranges = {"watermark": watermarkrange}
|
||||
|
||||
plot.title.text = title
|
||||
plot.title.text_font_size = value("1.0em")
|
||||
plot.title.text_font_size = "1.0em"
|
||||
plot.sizing_mode = 'stretch_both'
|
||||
|
||||
plot.image_url([watermarkurl], watermarkx, watermarky,
|
||||
@@ -5987,7 +5999,7 @@ def interactive_flex_chart2(id, r, promember=0,
|
||||
line_color=None)
|
||||
|
||||
plot.title.text = row.name
|
||||
plot.title.text_font_size = value("1.0em")
|
||||
plot.title.text_font_size = "1.0em"
|
||||
|
||||
plot.sizing_mode = 'stretch_both'
|
||||
plot.xaxis.axis_label = xaxlabel
|
||||
|
||||
Reference in New Issue
Block a user