Gnuplot::Builder::Wgnuplot - wrap wgnuplot with gnuplot_builder_tempfile_wrapper
## use Gnuplot::Builder; ## instead of Gnuplot::Builder... use Gnuplot::Builder::Wgnuplot; ## use this in Windows interactive session. my $script = gscript(terminal => "windows"); $script->plot("sin(x)", "cos(x)");
Gnuplot::Builder::Wgnuplot is a drop-in replacement (or strictly speaking, a wrapper) for Gnuplot::Builder. It loads Gnuplot::Builder and sets
@Gnuplot::Builder::Process::COMMAND = qw(gnuplot_builder_tempfile_wrapper wgnuplot -persist)
This means it changes the back-end to "wgnuplot" and script text is given to it as a temporary file.
Note that if you use Gnuplot::Builder::Wgnuplot, you cannot get diagnostic messages from plotting methods such as plot(). This is because "wgnuplot" does not use pipes at all and gnuplot_builder_tempfile_wrapper discards the output in the first place.
plot()
gnuplot_builder_tempfile_wrapper
It seems "wgnuplot" is the only implementation in Windows platform that can handle persistent plot windows correctly.
Use this module if and only if you are on Windows and you want to plot graphs in interactive plot windows (i.e. use "windows" or "wxt" terminals).
As of gnuplot 4.6, "wgnuplot" has a bug that it turns into a never-ending zombie process if it does not create a plot window.
This means if you call ghelp(), "wgnuplot" process persists even after you close the help window. To terminate the process, you have to use the Task Manager.
ghelp()
http://sourceforge.net/p/gnuplot/bugs/1335/
http://sourceforge.net/p/gnuplot/bugs/1343/
Gnuplot::Builder::Wgnuplot exports just the same functions as Gnuplot::Builder.
Gnuplot::Builder
Gnuplot::Builder::TempFile
Toshio Ito, <toshioito at cpan.org>
<toshioito at cpan.org>
To install Gnuplot::Builder::TempFile, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Gnuplot::Builder::TempFile
CPAN shell
perl -MCPAN -e shell install Gnuplot::Builder::TempFile
For more information on module installation, please visit the detailed CPAN module installation guide.