Thread overview | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
March 11, 2012 Low feature GNUPlot controller for D2 | ||||
---|---|---|---|---|
| ||||
I have been using a GNUPlot controller for my scientific work with D for some time now, so I just wanted to announce that such a thing exists if anybody is interested in using it or whatnot. It supports very some basic features (hence being low feature) which you can view in the example file: https://github.com/SiegeLord/DGnuplot/blob/master/example.d One unique feature that comes for free by virtue of using an external plotting program is that you don't have to plot things right away, but instead save the commands to a file and plot them at a different time (by piping them to gnuplot). I use this technique combined with sshfs to plot things remotely. Anyway, the repository for it is here: https://github.com/SiegeLord/DGnuplot It requires TangoD2 to build and gnuplot 4.4.3 to run (unless you're saving commands to a file as described above). It works on Linux, and maybe on Windows (untested). -SiegeLord |
March 11, 2012 Re: Low feature GNUPlot controller for D2 | ||||
---|---|---|---|---|
| ||||
Posted in reply to SiegeLord | On Sunday, 11 March 2012 at 21:45:02 UTC, SiegeLord wrote: > I have been using a GNUPlot controller for my scientific work with D for some time now, so I just wanted to announce that such a thing exists if anybody is interested in using it or whatnot. It supports very some basic features (hence being low feature) which you can view in the example file: https://github.com/SiegeLord/DGnuplot/blob/master/example.d > > One unique feature that comes for free by virtue of using an external plotting program is that you don't have to plot things right away, but instead save the commands to a file and plot them at a different time (by piping them to gnuplot). I use this technique combined with sshfs to plot things remotely. > > Anyway, the repository for it is here: https://github.com/SiegeLord/DGnuplot > It requires TangoD2 to build and gnuplot 4.4.3 to run (unless you're saving commands to a file as described above). > It works on Linux, and maybe on Windows (untested). > > -SiegeLord Forgot to mention, in case people miss it, documentation is also available: http://siegelord.github.com/DGnuplot/doc/gnuplot.html -SiegeLord |
March 12, 2012 Re: Low feature GNUPlot controller for D2 | ||||
---|---|---|---|---|
| ||||
Posted in reply to SiegeLord | On 3/11/2012 2:45 PM, SiegeLord wrote: > Anyway, the repository for it is here: https://github.com/SiegeLord/DGnuplot > It requires TangoD2 to build and gnuplot 4.4.3 to run (unless you're saving > commands to a file as described above). > It works on Linux, and maybe on Windows (untested). Great! Are any parts of it suitable for inclusion in https://github.com/D-Programming-Deimos ? |
March 12, 2012 Re: Low feature GNUPlot controller for D2 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Monday, 12 March 2012 at 01:02:06 UTC, Walter Bright wrote:
> Are any parts of it suitable for inclusion in https://github.com/D-Programming-Deimos ?
Doubt it, as it literally simply opens up a gnuplot process and pipes commands into it. There is no such thing as a libgnuplot or anything.
-SiegeLord
|
March 14, 2012 Re: Low feature GNUPlot controller for D2 | ||||
---|---|---|---|---|
| ||||
Posted in reply to SiegeLord | On Sunday, 11 March 2012 at 21:45:02 UTC, SiegeLord wrote: > Anyway, the repository for it is here: > https://github.com/SiegeLord/DGnuplot > It requires TangoD2 to build and gnuplot 4.4.3 to run (unless you're saving commands to a file as described above). > It works on Linux, and maybe on Windows (untested). > > -SiegeLord I just tried this on Win7 64 bit using the latest TangoD2 and the gnuplot from this link http://sourceforge.net/projects/gnuplot/files/ I had to substitute pgnuplot.exe, which is one of the windows gnuplot exe versions that accepts the piped input GNUPlot = new Process(true, "pgnuplot.exe -persist"); With that change one of the graphs displayed, the one with title "Raw gnuplot commands". The rest all failed, maybe due to the binary record input, which they try to echo to their text command shell. Maybe if there were an option to use text format input, or maybe there is some terminator expected. Their command shell fails to return to the prompt after echoing the binary data, and doesn't create the graph shell on these others that use the binary record input. |
March 14, 2012 Re: Low feature GNUPlot controller for D2 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jay Norwood | On Wednesday, 14 March 2012 at 07:16:39 UTC, Jay Norwood wrote: > > I just tried this on Win7 64 bit using the latest TangoD2 and the gnuplot from this link > http://sourceforge.net/projects/gnuplot/files/ > > I had to substitute pgnuplot.exe, which is one of the windows gnuplot exe versions that accepts the piped input > GNUPlot = new Process(true, "pgnuplot.exe -persist"); > > With that change one of the graphs displayed, the one with title "Raw gnuplot commands". The rest all failed, maybe due to the binary record input, which they try to echo to their text command shell. > > Maybe if there were an option to use text format input, or maybe there is some terminator expected. Their command shell fails to return to the prompt after echoing the binary data, and doesn't create the graph shell on these others that use the binary record input. There was discussion of windows problems with the binary data input elsewhere, including some discussion of the input being opened in text mode. Looks like the cygwin version might be a solution. http://octave.1599824.n4.nabble.com/Gnuplot-scripts-as-output-td1680624.html http://sourceforge.net/tracker/?func=detail&atid=102055&aid=2981027&group_id=2055 |
March 15, 2012 Re: Low feature GNUPlot controller for D2, problem solved on intel box | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jay Norwood | On Wednesday, 14 March 2012 at 07:33:52 UTC, Jay Norwood wrote:
> On Wednesday, 14 March 2012 at 07:16:39 UTC, Jay Norwood wrote:
> >
>> I just tried this on Win7 64 bit using the latest TangoD2 and the gnuplot from this link
>> http://sourceforge.net/projects/gnuplot/files/
>>
>> I had to substitute pgnuplot.exe, which is one of the windows gnuplot exe versions that accepts the piped input
>> GNUPlot = new Process(true, "pgnuplot.exe -persist");
>>
>> With that change one of the graphs displayed, the one with title "Raw gnuplot commands". The rest all failed, maybe due to the binary record input, which they try to echo to their text command shell.
>>
The use of pgnuplot.exe wasn't necessary. The problem turns out to be that it needed "endian=little" in the format string in C2DPlot Plot(...) for my box. After that, all the plots ran perfectly well using the original "gnuplot -persist" string for the process.
|
March 16, 2012 Re: Low feature GNUPlot controller for D2, problem solved on intel box | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jay Norwood | On Thursday, 15 March 2012 at 07:23:38 UTC, Jay Norwood wrote:
> The use of pgnuplot.exe wasn't necessary. The problem turns out to be that it needed "endian=little" in the format string in C2DPlot Plot(...) for my box. After that, all the plots ran perfectly well using the original "gnuplot -persist" string for the process.
Thanks for figuring it out and testing!
-SiegeLord
|
Copyright © 1999-2021 by the D Language Foundation