Yep, you have to open a link to gnuplot
fp = popen("gnuplot","w");
then somebody posted recently that you can plot data
stored in x and y arrays (up to index N-1) like so
fprint(fp, "plot \"-\"\n");
for (i=0; i<N; i++)
fprintf(fp, "%f %f\n", x[i], y[i]);
Although I usually dump to a file and then just plot
fprintf(fp, "plot 'file.dat' u 1:2\n")
were file.dat is were I usually dump data for example.
when your done, just close gnuplot by using
Does that answer your question?
__________________________________Quote:> This is my problem - I have program in c that gives
> me output of 4 data files, some of them in 4
> columns... I want to plot data directly
> (interactively) after calling the executable file
> produced from the source c file - is there a
> possibillity to somehow implement calling gnuplot
> form c??? eg, if I have to call - plot "df1", "df2"
> using 1:2, "df2" using 3:4 from gnuplot, how would I
> do the call from c and get the same result?
> if this is not possible, could you recommand some
> program that would do this easily - I tried sm,
> pgplot and plplot and have failed miserably, please
> help me if you can...
> Thank you
> Kosta Popovic
> Hamilton College
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
[[[[ to unsubscribe from info-gnuplot, send an email with body