Plot diagrams in C/C++[SOLVED]

Giorgos Keramidas keramida at ceid.upatras.gr
Wed Nov 23 00:02:24 EET 2005


On 2005-11-22 21:58, Karaoulis Marios <marios_hellas_23 at yahoo.gr> wrote:
> Ena mini-HOWTO
>
> Osoi grafoun kodika, kai KATA thn diarkeia ekteleshs 8eloun na blepoun kapoio
> diagramma, (osodhpote poluploko) mporoun na xrhsimopoihsoun kapoio apo ta
> interface tou gnuplot.
>
> Gia C --> http://ndevilla.free.fr/gnuplot/
> Gia C++-->http://jijo.cjb.net/code/cc++
> Gia Fortran -->http://gnuplotfortran.sourceforge.net/
>
> Ti xreiazetai.
> A) Katebaste to antoistoixo interface gia thn glossa pou xrhsimopoieite
> B) Ena PC pou na trexei gnuplot
>
> Gia to logou tou alh8es
> Gia glossa C
>
> Mesa ston fakelo src tou axeiou pou katebhke yparxoun duo arxeia
> gnuplot_i.h
> gnuplot_i.c
> Balte afta ta duo arxeia ston fakelo pou brhsketai o kodikas sas
>
> Dhmiourgeiste ena arxeio me ton kodika sas px test.c
>
> -----------------------------------------------------

Enallaktika, mporeis na kaneis:

    FILE *fp;

    fp = popen("gnuplot");
    if (fp == NULL)
        err(1, "popen: gnuplot");

    fprintf(fp, "plot sin(x) with lines\n");
    fflush(fp);

    pclose(fp);

Tsoyp :)  Etoimo to diagramma :)




More information about the Linux-greek-users mailing list