BaşlayınÜcretsiz başlayın

Adding LassoSelectTool

The agency loved your last plot! However, they have realized that it would also be useful to have access to the LassoSelectTool.

The figure and glyphs from the previous exercise have been preloaded for you.

Bu egzersiz, kursun bir parçasıdır

Interactive Data Visualization with Bokeh

Kursa Göz Atın

Egzersiz talimatları

  • Import LassoSelectTool from the relevant Bokeh class.
  • Add LassoSelectTool() to the figure's layout.

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

tools = ['poly_select', 'wheel_zoom', 'reset', 'save']

# Import LassoSelectTool
from ____.____ import ____

fig = figure(x_axis_label="Field Goal (%)", y_axis_label="Points per Game", tools=tools)
fig.circle(x=nba["field_goal_perc"], y=nba["points"])

# Update the figure to include LassoSelectTool
fig.____(____)
output_file(filename="updated_plot_with_lasso_select.html")
show(fig)
Kodu Düzenle ve Çalıştır