|
From: <gnu...@t4...> - 2008-03-18 10:49:16
|
If I've understood correctly how pgnuplot.exe is supposed to work on Win32, type "object map.gps" | pgnuplot.exe should be essentially equivalent to starting wgnuplot.exe and saying load "object map.gps" Is that right, or am I missing something here? The problem I see, both on 4.2 and 4.3, is that commands in object map.gps are seemingly lost or overlooked. This leads to syntax errors, and all sorts of other problems. Normally, pgnuplot.exe closes the wgnuplot.exe input window when it reaches EOF. However, in the above scenario with "type," the GnuPlot application window remains open, displaying the history of botched commands piped in from pgnuplot. That's how I know some commands (or parts of commands) are being skipped. It's almost as if the pipe needs flow control but doesn't have it... losing bytes that fall off the end of the "buffer" when it gets full. If I avoid type and put a "sleep 1" between every line I copy into the pipe, the script works fine, except that it takes an eternity to run anything nontrivial. If I open GnuPlot and say "load 'object map.gps'" it works fine. If I run wgnuplot.exe "/path/to/object map.gps", that also works fine. The apparent flow control problem is limited to pgnuplot.exe. (I've had no luck at all with wgnuplot_pipes.exe.) I've seen this behavior on multiple Windows XP installs, at least one Vista, and Server 2003, so it's not particular to one computer, OS, or GnuPlot version. Anyone else run into this problem? Anyone have an idea what's going on? Ideas for a work-around? If you want to try it yourself, I've attached an example *.gps that generates the errors from above. [If you try to run it on 4.3, you'll have to substitute c:/windows/fonts/verdana.ttf for Verdana.ttf as 4.3 seems to have lost the ability to find fonts without a full path to the file.] This all started because I'd really like to do "perl.exe script.pl | pgnuplot.exe" but that has the same issue. Tait |