我在演示期间看到可以做到这一点:https ://youtu.be/2Tt0i823-ec?t=769
在那里,演示者有一个巨大的数据集,并且可以通过用鼠标选择一个矩形来快速放大。
我还看到了教程的“交互式小部件”部分:https ://docs.vaex.io/en/latest/tutorial.html#Interactive-widgets
但是,我无法轻松复制该设置。实现它的最小步骤是什么?
在 Ubuntu 19.04 vaex 2.0.2 上,我尝试过:
python3 -m pip install --user vaex scipy pandas vaex-jupyter
jupyter nbextension enable --py widgetsnbextension
jupyter nbextension enable --py bqplot
jupyter nbextension enable --py ipyvolume
jupyter nbextension enable --py ipympl
jupyter nbextension enable --py ipyleaflet
jupyter nbextension enable --py ipyvuetify
jupyter notebook
然后我创建了一个笔记本并粘贴在笔记本中:
import vaex
import vaex.jupyter
import numpy as np
import pylab as plt
%matplotlib inline
df = vaex.example()
df.plot_widget(df.x, df.y, f='log1p', backend='bqplot')
但我得到的只是没有图表和消息:
Plot2dDefault(w=None, what='count(*)', x='x', y='y', z=None)
相反,如果我这样做:
df.plot(df.x, df.y, f='log1p')
然后我确实得到了一个情节,但这只是一个非交互式图像。
我还尝试 git 克隆作为阅读文档页面来源的笔记本:https ://github.com/vaexio/vaex/blob/0247f0673c5c0473001b0b66adcbc716560536aa/docs/source/tutorial.ipynb但结果是相同的。
我的动机是找到一个可以处理大量点的绘图程序,如下所述:Large plot: ~20M samples, GB data