【发布时间】:2019-12-10 21:12:30
【问题描述】:
在demo的时候看到是可以做到的:https://youtu.be/2Tt0i823-ec?t=769
那里,presenter 有一个巨大的数据集,并且可以通过鼠标选择一个矩形来快速放大。
我还看到了教程的“交互式小部件”部分: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: ~20 million samples, gigabytes of data
【问题讨论】:
-
你是从 jupyter 实验室还是经典笔记本运行这个?
-
@MaartenBreddels 我不确定,我刚刚输入了
jupyter notebook,如问题所示:-) 好的,我刚刚搜索过,jupyter lab 是从jupyter lab开始的,所以我猜是经典笔记本。 -
可以用 3D 代替 2D 吗?
-
@TiagoMartinsPeres 不知道!试一试,如果找不到,请打开一个新问题并链接到它。
-
先使用 Mayavi,因为知道这是可能的 (docs.enthought.com/mayavi/mayavi/mlab.html)。如果有足够的时间我会试试的。
标签: vaex