View Full Version : plot
enricfemi
Aug6-09, 07:21 AM
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?
CFDFEAGURU
Aug7-09, 11:53 AM
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.
0xDEADBEEF
Aug7-09, 04:57 PM
Get gnuplot. Learn how to run external programs from c. Make a function that writes a temp file and run gnuplot over it.
enricfemi
Sep22-09, 09:45 PM
Thx.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.