dash文件 Part4 互動式視覺化

2021-08-17 03:02:44 字數 661 閱讀 5199

dash_core_components庫包含乙個名為graph的元件

dcc.graph元件具有四個可以通過使用者互動進行更改的屬性:hoverdataclickdataselecteddatarelayoutdata。當將滑鼠懸停、單擊點或在圖形中選擇點的區域時,這些屬性會更新,將互動活動繫結到dash graph元件上。

滑鼠懸停時更新圖

當滑鼠滑過散點圖上的點時,右邊的線條圖是根據滑鼠懸停的點來更新的

交叉過濾

在第乙個圖上選擇散點,根據所選的點來讀取pandas資料框架,並重新顯示圖形,選中的地方被高亮顯示,並且用虛線框圈住,這樣一來可以在另外的兩個圖形上過濾出剛剛選擇的散點。

目前的限制

使用Dash開發互動式資料視覺化網頁 頁面布局

後續的操作前,需要安裝如下python包 pip install dash 0.20.0 the core dash backend pip install dash renderer 0.11.2 the dash front end pip install dash html component...

expect 指令碼中可實現非互動式操作

如何用expect自動幫你發郵件 自動互動 root localhost mail s ddd root vim sss.sh bin bash expect root server0 mail s test root eof 寫郵件 test mail hell world eof 通過迴圈批量操...

建立互動式部落格 jquery (4)

jquery可以是html element具有動感。body click function slideup 方法通過向上滑動的方式隱藏選定的html element。如下 body click function fadein 方法通過漸進的方式顯示選定的html element。如下 body cl...