pandas 有没有办法让 Seaborn 或 Vincent 互动?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31247460/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 23:34:29  来源:igfitidea点击:

Is there a way to make Seaborn or Vincent interactive?

pythonpandastime-seriesseabornvincent

提问by cavs

I've been trying to find a way to make Seaborn and Vincent interactive so that I can, for example, zoom in/out in a specific area of the plot in real time. Is this possible to do? Alternatively, are there other recommended libraries (that are not cloud-based services) that work well for visualizing time series data?

我一直试图找到一种方法让 Seaborn 和 Vincent 互动,例如,我可以实时放大/缩小情节的特定区域。这有可能吗?或者,是否有其他推荐的库(不是基于云的服务)可以很好地用于可视化时间序列数据?

采纳答案by Marius

If this is for your own benefit, rather than something you need to show to others, you can use IPython notebooks and the %matplotlib nbaggbackend, at least for Seaborn, e.g.:

如果这是为了你自己的利益,而不是你需要向他人展示的东西,你可以使用 IPython notebooks 和%matplotlib nbagg后端,至少对于 Seaborn,例如:

%matplotlib nbagg
import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(0, 50, 100)
y = x**(0.5)

plt.plot(x, y)

If you don't already have IPython etc. set up, you can quickly test this out by creating a new notebook at try.jupyter.org, pasting the code into a cell, and hitting Shift + Enterto run. Since this is running on a free VM it will be slow, running the notebook locally will mean panning/zooming is much smoother.

如果您还没有设置 IPython 等,您可以通过在try.jupyter.org创建一个新笔记本,将代码粘贴到一个单元格中,然后点击Shift + Enter运行来快速测试。由于这是在免费 VM 上运行,因此速度会很慢,因此在本地运行笔记本将意味着平移/缩放更加流畅。