1. Learn
  2. /
  3. Courses
  4. /
  5. Interactive Data Visualization with Bokeh

Exercise

Formatting the HoverTool

Now you've built a plot with a HoverTool, it's time to go one step further by formatting how the information is presented.

The agency has asked for a plot of average minutes versus average points per game. They would like the HoverTool to identify the player's name, their conference, and their field goal percentage rounded to the nearest 2 decimal places.

Instructions

100 XP
  • Create TOOLTIPS, including the conference, and field_goal_perc columns as Conference, and Field Goal %, respectively.
  • Format the field_goal_perc element of TOOLTIPS to display to the nearest two decimal places.
  • Create the figure, labeling the x-axis as "Minutes" and the y-axis as "Points", including TOOLTIPS.
  • Add circle glyphs, with minutes on the x-axis against points, using source.