updated OTW CP plot
This commit is contained in:
@@ -645,10 +645,14 @@ def interactive_otwcpchart(powerdf,promember=0):
|
||||
# message = "CP model fit didn't give correct results"
|
||||
|
||||
|
||||
deltas = fitt.apply(lambda x: timedeltaconv(x))
|
||||
ftime = niceformat(deltas)
|
||||
|
||||
sourcecomplex = ColumnDataSource(
|
||||
data = dict(
|
||||
power = fitpower,
|
||||
duration = fitt
|
||||
CP = fitpower,
|
||||
duration = fitt,
|
||||
ftime = ftime
|
||||
)
|
||||
)
|
||||
|
||||
@@ -671,7 +675,7 @@ def interactive_otwcpchart(powerdf,promember=0):
|
||||
y_range_name = "watermark",
|
||||
)
|
||||
|
||||
plot.line('Delta','CP',source=source,color='red',line_width=5,
|
||||
plot.circle('Delta','CP',source=source,fill_color='red',size=15,
|
||||
legend='Power Data')
|
||||
plot.xaxis.axis_label = "Duration (seconds)"
|
||||
plot.yaxis.axis_label = "Power (W)"
|
||||
@@ -689,7 +693,7 @@ def interactive_otwcpchart(powerdf,promember=0):
|
||||
|
||||
hover.mode = 'mouse'
|
||||
|
||||
plot.line('duration','power',source=sourcecomplex,legend="CP Model",
|
||||
plot.line('duration','CP',source=sourcecomplex,legend="CP Model",
|
||||
color='green')
|
||||
|
||||
script, div = components(plot)
|
||||
|
||||
Reference in New Issue
Block a user