Private
Public Access
1
0

added callouts to age group record graph

This commit is contained in:
Sander Roosendaal
2017-12-13 21:39:22 +01:00
parent 035a4bf87f
commit 84448c6a54

View File

@@ -1073,6 +1073,8 @@ def interactive_agegroup_plot(df):
age = df['age']
power = df['power']
name = df['name']
season = df['season']
poly_coefficients = np.polyfit(age,power,6)
@@ -1084,17 +1086,29 @@ def interactive_agegroup_plot(df):
age = age,
power = power,
age2 = age2,
poly_vals = poly_vals
poly_vals = poly_vals,
season = season,
name=name,
)
)
TOOLS = 'save,pan,box_zoom,wheel_zoom,reset,tap,hover,resize,crosshair'
plot = Figure(plot_width=900)
plot = Figure(tools=TOOLS,plot_width=900)
plot.circle('age','power',source=source,fill_color='red',size=15,
legend='2k Power')
plot.line(age2,poly_vals)
plot.xaxis.axis_label = "Age"
plot.yaxis.axis_label = "Concept2 2k power"
hover = plot.select(dict(type=HoverTool))
hover.tooltips = OrderedDict([
('Name ','@name'),
('Season ','@season'),
])
hover.mode = 'mouse'
script,div = components(plot)