LoslegenKostenlos starten

Setting tools

The agency is now interested in understanding whether the most accurate shooters are more likely to average a higher amount of points per game. They would like to have the toolbar customized to include poly_select, wheel_zoom, reset, and save, so they can further investigate the plot themselves.

The nba DataFrame is again available to you.

Diese Übung ist Teil des Kurses

<Kurs>Interactive Data Visualization with Bokeh</Kurs>
Kurs ansehen

Übungsanweisungen

  • Create a list of required tools, poly_select, wheel_zoom, reset, and save.
  • Create a figure, fig, labeling the x and y axes as "Field Goal (%)" and "Points per Game", along with setting the tools to be included.
  • Add circle glyphs to represent "field_goal_perc" as x and "points" as y.
  • Generate an HTML file called "points_vs_field_goal_perc.html", and display the plot.

Interaktive praktische Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Create a list of tools
tools = ____

# Create figure and set tools
fig = ____(x_axis_label="Field Goal (%)", y_axis_label="Points per Game", tools=____)

# Add circle glyphs
fig.____(____=____, ____=____)

# Generate HTML file and display plot
____
____(____)
Code bearbeiten und ausführen