เครื่องมือการกำหนดค่า

การสร้างภาพข้อมูลแบบอินเทอร์แอกทีฟด้วย Bokeh

George Boorman

Core Curriculum Manager, DataCamp

แถบเครื่องมือเริ่มต้น

  • PanTool
    • pan Pan
  • BoxZoomTool
    • box_zoom Box Zoom
  • WheelZoomTool
    • wheel_zoom Wheel Zoom
  • Save
    • save Save
  • Reset
    • reset Reset

แถบเครื่องมือเริ่มต้น

การสร้างภาพข้อมูลแบบอินเทอร์แอกทีฟด้วย Bokeh

เครื่องมือการกำหนดค่า

หัวข้อที่จะครอบคลุม:

  • เครื่องมือ Pan/Drag

  • เครื่องมือ Click/Tap

  • เครื่องมือ Scroll/Pinch

 

เครื่องมืออื่นที่อยู่นอกขอบเขตคอร์ส:

  • Actions

  • Inspectors

  • Edit tools

1 http://docs.bokeh.org/en/latest/docs/user_guide/tools.html
การสร้างภาพข้อมูลแบบอินเทอร์แอกทีฟด้วย Bokeh

เครื่องมือ Pan/Drag

  • PanTool

    • pan Pan
  • BoxSelectTool

    • box_select Box Select
  • BoxZoomTool

    • box_zoom Box Zoom
  • LassoSelectTool

    • lasso_select Lasso Select

วิดีโอ Pan

Lasso Select

การสร้างภาพข้อมูลแบบอินเทอร์แอกทีฟด้วย Bokeh

เครื่องมือ Click/Tap

 

  • PolySelectTool
    • poly_select PolySelect

 

 

  • TapTool
    • tap Tap

Poly Select Demo

 

Tap Demo

การสร้างภาพข้อมูลแบบอินเทอร์แอกทีฟด้วย Bokeh

เครื่องมือ Scroll/Pinch

  • WheelZoomTool
    • wheel_zoom Wheel Zoom

 

 

  • WheelPanTool Wheel Pan
    • xwheel_pan
    • ywheel_pan

Wheel Zoom Demo

การสร้างภาพข้อมูลแบบอินเทอร์แอกทีฟด้วย Bokeh

การปรับแต่งแถบเครื่องมือ

from bokeh.models import BoxSelectTool

fig = figure(x_axis_label="Steals per Game", y_axis_label="Assists per Game") fig.circle(x=nba["steals"], y=nba["assists"])
fig.add_tools(BoxSelectTool())
output_file(filename="adding_box_select.html") show(fig)

การเพิ่ม BoxSelect

การสร้างภาพข้อมูลแบบอินเทอร์แอกทีฟด้วย Bokeh

กำหนดรายการเครื่องมือเอง

tools = ["lasso_select", "box_zoom", "tap"]

fig = figure(x_axis_label="Steals", y_axis_label="Assists",
tools=tools)
fig.circle(x=nba["steals"], y=nba["assists"]) output_file(filename="custom_tools.html") show(fig)

  รายการเครื่องมือ

การสร้างภาพข้อมูลแบบอินเทอร์แอกทีฟด้วย Bokeh

มาฝึกกันเถอะ!

การสร้างภาพข้อมูลแบบอินเทอร์แอกทีฟด้วย Bokeh

Preparing Video For Download...