简体   繁体   English

Python-条形图实时

[英]Python- Bar chart real time

How can I create a bar/column chart in python using animation in real time ? 如何使用动画实时在python中创建条形图/柱形图? I have made static bar graphs. 我制作了静态条形图。 Currently I have a program that feeds value from a machine to an excel file and my program should read that file in real time and plot a bar graph. 目前我有一个程序可以将机器中的值提供给excel文件,我的程序应该实时读取该文件并绘制条形图。 I just want to look at patterns. 我只是想看看模式。 It should update after every 100 points. 每100分后应该更新一次。 Thanks in advance !For more clarification I would like to add that it should look like the bar graph in the video provided in the link https://www.pond5.com/stock-footage/58163733/animated-line-bar-charts-business-plan-presentation-showing.html but should not be a image and should update real time data. 在此先感谢!有关更多说明,我想补充一点,它应该看起来像链接中提供的视频中的条形图https://www.pond5.com/stock-footage/58163733/animated-line-bar-charts -business-plan-presentation-showing.html但不应该是图像,应该更新实时数据。 I am okay if I can do this in Javascript as well. 如果我能在Javascript中做到这一点,我也没关系。 Thanks. 谢谢。

It looks like matplotlib.animation might meet your needs. 看起来matplotlib.animation可能会满足您的需求。

Docs: http://matplotlib.org/examples/animation/ 文件: http//matplotlib.org/examples/animation/

Tutorial: https://pythonprogramming.net/python-matplotlib-live-updating-graphs/ 教程: https//pythonprogramming.net/python-matplotlib-live-updating-graphs/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM