开发者

live graph ploting in using c programming

hi every one is there a way by w开发者_如何转开发hich 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.


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜