Evolution of the point guard
The agency is going to run an article on the evolution of the Point Guard position in basketball.
They have asked you to produce a line plot displaying points and assists for two players who have redefined the standards of this position - Steph Curry and Chris Paul. Two Bokeh source objects, steph and chris, have been preloaded for you along with a figure.
You will add line glyphs representing points and assists for the two players, using different glyph settings.
Este exercício faz parte do curso
Interactive Data Visualization with Bokeh
Instruções do exercício
- Add line glyphs to represent Steph Curry's average points, filling in green, and setting the width to
2and transparency to0.5. - Display Steph Curry's average assists as line glyphs filled in purple, setting the width to
4and transparency to0.3. - For Chris Paul's average points, add line glyphs filled in red, setting the width to
1and transparency to0.8. - Add line glyphs to represent Chris Paul's average assists, filled in orange, with a width of
3and transparency of0.2.
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
fig = figure(x_axis_label="Season", y_axis_label="Performance")
# Add line glyphs for Steph Curry
fig.line(x="season", y="points", source=steph, ____=____, ____="____", ____=____, legend_label="Steph Curry Points")
fig.line(x="season", y="assists", source=steph, ____=____, ____="____", ____=____, legend_label="Steph Curry Assists")
# Add line glyphs for Chris Paul
fig.line(x="season", y="points", source=chris, ____=____, ____="____", ____=____, legend_label="Chris Paul Points")
fig.line(x="season", y="assists", source=chris, ____=____, ____="____", ____=____, legend_label="Chris Paul Assists")
output_file(filename="point_guards.html")
show(fig)