I am collecting samples using a text file in my C program. I want to plot a wave using those values in Excel. How can I export data from Excel to program ??? How can i do this ??? Otherwise what is the other way to use wave in C program ???
Thank you in advance ...
Since you look open for options If so, can I suggest it is a very convenient plotting software that can be easily controlled through pipes. If you want to plot some graphs, then it is easy to use, which is bigger than that.
To control Gnuplot from your own software, start it as a new process and stdin has an in-built help function for commands, and available on the site I've linked to Detailed documentation. To plot some data generated by your program, you can make it something like this:
set word x11 pasting plot '1' with lines 1: 2 Do this 1 2 2 3 3 2.5 5 1E
This example is for Linux, and shows the plot in a new window which remains after the control program comes out, which It is easy if you want to see the graph. To optimize for other platforms, the set term
line can be changed, or instead to save the output to the file (there are many output formats including PNG and SVG).
Here is an example graph which I now use
pgg set output "a-graph.png"
set
And then running the above plot command.
Comments
Post a Comment