gnuplot_pipes format on Windows



Am 7 Apr 2007 um 21:09 hat Andrej Vodopivec geschrieben:

> > it seems that the new gnuplot_pipes format doesn't work on Windows. Is that
> > correct?
> 
> Yes this is correct. wgnuplot.exe is a windows gui application and you
> can't communicate with it using pipes.

the following Java code works on Windows. 
it uses pgnuplot.exe.
maybe this is a point to start from. can this be translated to Lisp?

Volker

import java.io.*;
public class PGnuplot {
   public static void main(String[] args) throws InterruptedException {
      try {
         Process p = Runtime.getRuntime().exec(
               "C:/Programme/gnuplot/bin/pgnuplot.exe -persist");
         BufferedWriter bw = new BufferedWriter( 
               new OutputStreamWriter(p.getOutputStream()) );
            
         bw.write("plot sin(x)\n");
         bw.flush();

         Thread.sleep(1000);
         bw.write("set xrange [0:pi]; replot\n");
         bw.flush();

         Thread.sleep(1000);
         bw.write("exit\n");
         bw.close();
      } catch (Exception e) { }
   }
}