python - 与 Matplotlib 图中的曲线交互

标签 python matplotlib user-interaction

我希望允许类似于 this Javascript demo 的用户交互在 Matplotlib 图中。 我非常清楚如何使用 slider 小部件来做到这一点,但我更喜欢与曲线直接交互。有哪些工具可用? 它不一定是一个网络应用程序,它可以是内置于情节中的简单交互。

最佳答案

我见过的更好的方法之一是使用 mpld3库(github link ,它在将 matplotlib 嵌入到 D3.js 方面做得非常好。

好处是交互性来自 javascript。
缺点是交互性来自 javascript。

我以此作为阿特伍德定律的一个例子。

关于python - 与 Matplotlib 图中的曲线交互,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27452923/

相关文章:

python - 无法导入名称 ContextualZipFile

python - 使用 python 提交 mysql 查询

python - 如何在直方图中居中标签

iphone - 确定我的 iOS 应用程序中使用了哪些功能

iphone - 如何在两个重叠的 UIView 中启用用户交互?

python - Numpy 多数组.so : undefined symbol: cblas_sgemm

python - 填写缺失的数据 Pandas

python - 将数组归一化为标准正态分布

python - 使用 matplotlib 按行绘制数组

linux - Bash Y/N​​ 提示也接受 ENTER 键