On Fri, 2013-10-25 at 02:27 +0200, Benoît Minisini wrote: > Le 24/10/2013 15:08, Tobias Boege a écrit : > > My workaround always was like this: > > > > ' Create the read pipe special file > > hGPstdout = Pipe "/tmp/gnuplotFIFO2" For Write > > Close #hGPstdout > > ' Create write end > > hGPpipe = Pipe "/tmp/gnuplotFIFO1" For Write > > ' Start writer > > hGPproc = Shell "gnuplot </tmp/gnuplotFIFO1 >/tmp/gnuplotFIFO2" > > ' Really create read end > > hGPstdout = Pipe "/tmp/gnuplotFIFO2" For Read Watch > > > > Note that since the shell which starts hGPproc already opened > > /tmp/gnuplotFIFO2, you won't have any deadlock problems when opening > > hGPstdout For Read afterwards. > > > > Anyway, if I > > > > Print #hGPpipe, "plot x^2" > > > > only garbage (not non-sense but the string is always scrambled) seems to > > arrive at gnuplot. Also, I seem to get output from gnuplot irregularly. So > > I'm out of options for now. I remember that raising Read events for streams > > has been subject to issues from time to time... > > > > Regards, > > Tobi > > > > Please give details. I tried what you said (but "plot x*x" because" > "plot x^2" seems to not be the good syntax), and I always got the plot > as expected. >
I have attached a project showing "how far I've got" with this. Notes: 1) some things are disabled because they need other components not included. (They don't matter for this issue, which is only about the pipes.) 2) The "Plot" button on the first tab will create a gnuplot cos(x) chart and the "Preview" button creates an embedded chart (on the Preview tab). You may have to click it twice to get it to work "properly". 3) You can close either of these plots by moving the mouse over it an pressing "q". In fact you have to do this if you want to swap between the external and embedded plots. 4) Either plot responds to gnuplot "mouse" commands. (Put the mouse over the plot and press "h", then look at the console output.) 4a) In particular, using the mouse scroll wheel seems to frequently inject "junk" into the pipe. I know that the UI is attrocious! (This was just a proof of concept draft (and the Lord forbid that Felicity finds out that I released this into the wild ;-) )). regards Bruce
gnuplotter-0.0.1.tar.gz
Description: application/compressed-tar
------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user