[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnuplot-info
Subject:    Re: Plotting online
From:       dirk caspary <dcaspar () gwdg ! de>
Date:       2003-05-15 8:15:20
[Download RAW message or body]

Hello,
>
> Dear Colleague,
>
> I would like to see Gnuplot working in an "watch file" mode.
> For example, say, my Fortran code is generating a 2-column data file
> and as it does so I like to have my Gnuplot go on plotting the
> results automatically.

I'm not familiar with FORTRAN, but on a Linux system the C solution
looks like (was posted a long time ago)

int main()
{
        FILE *fp;
        fp = popen("gnuplot","w");

        /* Plot x*x */
        fprintf(fp,"plot x*x\n");
        fflush(fp);

        fprintf(stderr,"\nPress <ENTER> to exit....\n");
        getchar();

        /* Send postscript output to file outfile.ps */
        fprintf(fp,"set output \"outfile.ps\"\nset term post\nplot x*x\n");

        pclose(fp);
        return 0;
}



Bye
	d!rk

------------------------------------------------------------------------
Hiermit widerspreche ich der Nutzung oder Übermittlung meiner Daten für
Werbezwecke oder für die Markt- oder Meinungsforschung gemäss § 28 Abs.3
Bundesdatenschutzgesetz.

 - -
[[[[ to unsubscribe from info-gnuplot, send an email with body
unsubscribe info-gnuplot
to majordomo@dartmouth.edu
]]]]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic