I use c to program. plot them with other software like IDL or origin.

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
4 replies · 3K views
enricfemi
Messages
195
Reaction score
0
I use c to program. Usually, I write the data to files and plot them with other software like IDL or origin. but I really tired of it, since i need open a file thousands times while debug.

Is there any better method to plot the data. which methods do you use?
 
Physics news on Phys.org


Yes there is a much better way. I too have had to do the same thing until I found a solution in Numerical Recipes 3rd Edition. You will have to purchase the book or the source code but chapter 22 has a PSplot and PSpage routine that can be used to create graphs that open up automatically in a pop up window. You will need to download the GSview.exe from Ghostview also. The book is really worth the price.

Hope this helps.
 


You can write data to a file, then from your C program run a separate program to generate a graph from the file and open it in a window. I use gnuplot.
 


Get gnuplot. Learn how to run external programs from c. Make a function that writes a temp file and run gnuplot over it.