x axis in minutes
This commit is contained in:
@@ -2898,12 +2898,15 @@ def interactive_otwcpchart(powerdf,promember=0,rowername="",r=None,cpfit='data',
|
|||||||
|
|
||||||
deltas = powerdf['Delta'].apply(lambda x: timedeltaconv(x))
|
deltas = powerdf['Delta'].apply(lambda x: timedeltaconv(x))
|
||||||
powerdf['ftime'] = niceformat(deltas)
|
powerdf['ftime'] = niceformat(deltas)
|
||||||
|
powerdf['Deltaminutes'] = powerdf['Delta']/60.
|
||||||
|
|
||||||
|
|
||||||
source = ColumnDataSource(
|
source = ColumnDataSource(
|
||||||
data = powerdf
|
data = powerdf
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# there is no Paul's law for OTW
|
# there is no Paul's law for OTW
|
||||||
|
|
||||||
thesecs = powerdf['Delta']
|
thesecs = powerdf['Delta']
|
||||||
@@ -2935,7 +2938,7 @@ def interactive_otwcpchart(powerdf,promember=0,rowername="",r=None,cpfit='data',
|
|||||||
data = dict(
|
data = dict(
|
||||||
CP = fitpower,
|
CP = fitpower,
|
||||||
CPmax = ratio*fitpower,
|
CPmax = ratio*fitpower,
|
||||||
duration = fitt,
|
duration = fitt/60.,
|
||||||
ftime = ftime,
|
ftime = ftime,
|
||||||
workout = workouts,
|
workout = workouts,
|
||||||
)
|
)
|
||||||
@@ -2974,21 +2977,21 @@ def interactive_otwcpchart(powerdf,promember=0,rowername="",r=None,cpfit='data',
|
|||||||
y_range_name = "watermark",
|
y_range_name = "watermark",
|
||||||
)
|
)
|
||||||
|
|
||||||
plot.circle('Delta','CP',source=source,fill_color='red',size=15,
|
plot.circle('Deltaminutes','CP',source=source,fill_color='red',size=15,
|
||||||
legend='Power Data')
|
legend='Power Data')
|
||||||
plot.xaxis.axis_label = "Duration (seconds)"
|
plot.xaxis.axis_label = "Duration (minutes)"
|
||||||
plot.yaxis.axis_label = "Power (W)"
|
plot.yaxis.axis_label = "Power (W)"
|
||||||
|
|
||||||
plot.y_range = Range1d(0,1.5*max(theavpower))
|
plot.y_range = Range1d(0,1.5*max(theavpower))
|
||||||
plot.x_range = Range1d(1,2*max(thesecs))
|
plot.x_range = Range1d(0.5*min(thesecs)/60.,2*max(thesecs)/60.)
|
||||||
plot.legend.orientation = "vertical"
|
plot.legend.orientation = "vertical"
|
||||||
if not title:
|
if not title:
|
||||||
title = "Critical Power for "+rowername
|
title = "Critical Power for "+rowername
|
||||||
plot.title.text = title
|
plot.title.text = title
|
||||||
|
|
||||||
xaxis = plot.select(dict(type=Axis, layout="below"))[0]
|
xaxis = plot.select(dict(type=Axis, layout="below"))[0]
|
||||||
xaxis.formatter = PrintfTickFormatter(format="%5f")
|
xaxis.formatter = PrintfTickFormatter()
|
||||||
#xaxis.formatter.use_scientific = False
|
|
||||||
|
|
||||||
hover = plot.select(dict(type=HoverTool))
|
hover = plot.select(dict(type=HoverTool))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user