使用 C 编程实时绘制图形

发布于 2024-10-21 17:41:19 字数 164 浏览 0 评论 0原文

大家好,有没有一种方法可以使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

﹎☆浅夏丿初晴 2024-10-28 17:41:19

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

终弃我 2024-10-28 17:41:19

我建议您从一些 GTK 编程教程开始。

这是一个简单的线条画教程/示例,可以帮助您入门。

http://library.gnome.org /devel/gtkmm-tutorial/2.99/sec-cairo-drawing-lines.html.en

还有一些你认为它应该是什么样子的草图(用笔在纸上)。


既然您说您对此作为编程练习感兴趣,那么我还提供以下提示:

您将需要找出以下问题的答案:

* How shall I save the graph data (csv I guess)
* How can I read the graph data into my program?
* How shall I detect when the graph data has changed
* How shall I plot the graph
* How shall I plot the graph metadata, such as axes, titles, scales etc.
* How shall I deal with the data as more and more arrives?

祝您好运,当您遇到困难时返回 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:

* How shall I save the graph data (csv I guess)
* How can I read the graph data into my program?
* How shall I detect when the graph data has changed
* How shall I plot the graph
* How shall I plot the graph metadata, such as axes, titles, scales etc.
* How shall I deal with the data as more and more arrives?

Good luck, and come back to stackoverflow when you get stuck

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文