【发布时间】:2015-03-19 22:18:52
【问题描述】:
我如何制作一个像这里显示的那样的交互式绘图?我想显示一张图像,其中包含在可以通过单击图像进行调整的点处拍摄的图像的 x 和 y 切片。
我知道这是在 Chaco 制作的,但由于 Chaco 与 python3 不兼容,所以最好使用 matplotlib 或 bokeh。
【问题讨论】:
-
这在 matplotlib 中绝对是可能的。你有没有尝试过?我建议从查看matplotlib.org/users/event_handling.html 和matplotlib.org/users/event_handling.html 开始。另请参阅 github.com/tacaswell/bubblegum/blob/master/bubblegum/backend/… 了解您想要的内容,但您可能需要从更大的框架中提取它。
-
我还没试过。我对 matplotlib 的事件处理很陌生,但是您建议的来自bubblegum 的 cross_section_2d 正是我想要的。我猜对于 2d 图像来说,横截面是比切片更常见的描述。
标签: python matplotlib ipython bokeh chaco