使用 C 编程实时绘制图形
大家好,有没有一种方法可以使用 C 编程绘制实时图形。就像我在 csv 文件中存储了一些值一样,我将添加列的值并将它们绘制在图表中。实时绘图仪可以在我的应用程序仍在计算数据时自动更新数据图表。以及如何我将图形附加到 GUI 中,并在我的 C 程序中使用该图形绘图仪。
谢谢任何帮助,我们将不胜感激。
hi every one is there a way by which i can draw live graph using c programming. like i have some values stored in a csv file i will add values of the column and plot them in a graph.a real-time plotter that can automatically update graphs of my data while it is still being computed by my application.and how can i append the graph in a gui.and use that graph plotter in my c program.
thanks any help will be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
gnuplot 可以从管道读取数据,这样您就可以从代码中更新绘图 - 而且您不必这样做自己处理任何 GUI 或窗口代码
gnuplot can read data from a pipe so you can update the plot from your code - and you don'y have to handle any gui or windowing code yourself
我建议您从一些 GTK 编程教程开始。
这是一个简单的线条画教程/示例,可以帮助您入门。
http://library.gnome.org /devel/gtkmm-tutorial/2.99/sec-cairo-drawing-lines.html.en
还有一些你认为它应该是什么样子的草图(用笔在纸上)。
既然您说您对此作为编程练习感兴趣,那么我还提供以下提示:
您将需要找出以下问题的答案:
祝您好运,当您遇到困难时返回 stackoverflow
I suggest you start by doing some GTK programming tutorials.
Here's a simple tutorial/example of line drawing to get you started.
http://library.gnome.org/devel/gtkmm-tutorial/2.99/sec-cairo-drawing-lines.html.en
Also so some sketches (with a pen, on paper) of what you think it should look like.
Since you said you are interested in this as a programming exercise, I also offer the following hints:
You will need to work out answers to the following questions:
Good luck, and come back to stackoverflow when you get stuck