Python 中的动态图表 [英] Dynamic Chart in Python

查看:35
本文介绍了Python 中的动态图表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我本质上是想复制谷歌金融图表,但用于传感器数据.我想将图表嵌入到 GUI 中并让它在计时器上更新(它对传感器的值进行采样).我想合并平移、调整大小和添加移动平均线,就像谷歌金融图表一样,所有这些都在某个稳定的时间间隔内更新.

I am essentially trying to replicate the google finance chart, but for sensor data. I would like to embed the chart in a GUI and have it update on a timer (which samples the sensor for it's value). I would like to incorporate panning, resizing, and adding moving averages, much like the google finance charts, all of which is updated at some steady interval.

我的大部分代码库已经在 python 中,所以我想坚持使用它.这可以用 Python 完成吗?

Much of my code base is already in python, so I would like to stick with it. Can this be done with Python?

我已经检查了 matplotlib,但我不确定它是否可以做动态图表.我正在使用 wxPython 创建 GUI.

I have checked out matplotlib, but I am not sure if it can do dynamic charts. I am using wxPython to create the GUI.

推荐答案

我最近遇到了 Enthought 的 Chaco.

I recently came across Chaco from Enthought.

http://code.enthought.com/projects/chaco/

它是一个用 Python 编写的开源框架,与 wx、Qt 等结合,比 matplotlib 更适用于构建完整的应用程序.非常实用且易于定制.您可以使用打包的平移、缩放工具或构建自己的工具.

It is an open source framework written in Python that binds with wx, Qt etc and more usable than matplotlib for building full applications. Very usable and easily customizable. You can use the packaged panning, zooming tools or build your own.

如果您选择继续使用它,我建议您下载 epd-free 软件包以确保您获得所有依赖项.

I would suggest downloading the epd-free package to ensure you get all dependencies if you choose to move ahead with it.

http://www.enthought.com/products/epd_free.php/

这篇关于Python 中的动态图表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆