Re: Chart::Gnuplot and Windows XP by BrowserUk (Apostle) on Nov 05, 2008 at 11:25 UTC |
'gnuplot' is not recognized as an internal or external command,operable program or batch file.
If you put a file called gnuplot.bat somewhere it can be found through your path environment variable, it should work fine.
Or you could rename (or make a copy of) wgnuplot.exe called gnuplot.exe. Again, it would need to be located somewhere on your path.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] [select] |
|
Changing the name of the executable gives an "Invalid Parameter - 90" error.
Using a .bat file:
"C:\gnuplot\binaries\wgnuplot.exe" %1 results in the call C:\workspace\Testbed>"C:\gnuplot\binaries\wgnuplot.exe" \tmp\NTEVfipQVM/plot and gives the same error.
| [reply] [d/l] [select] |
|
\tmp\NTEVfipQVM/plot
................^
And that if you modified Chart::Gnuplot something along the lines of:
sub new
{
my ($class, %hash) = @_;
# Create temporary file to store Gnuplot instructions
if (!defined $hash{_multiplot}) # if not in multiplot mode
{
my $dirTmp = tempdir(CLEANUP => 1, DIR => '/tmp');
########### change here
$hash{_script} = $^O eq 'MSWin32' ? "$dirTmp\plot" : "$dirTmp/
+plot";
Then it might work.
Of course, there are probably other places (like the line above) that might need similar treatment--and there are certainly better ways (File::Spec and friends) of making the path handling properly cross-platform--, but a few simple changes like this might allow you to get on with your work.
And if you fed what changes you need, back to the module author, they might be able to integrate them back into the next release.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] [select] |
|
|
Re: Chart::Gnuplot and Windows XP by Anonymous Monk on Nov 05, 2008 at 11:27 UTC |
Has anybody made Chart::Gnuplot with gnuplot work under Windows XP? Or is this yet another reason to change OS?!
Wow, just wow, the drama :)
# Create chart object and specify the properties of the chart
my $chart = Chart::Gnuplot->new(
output => "fig/simple.png",
title => "Simple testing",
xlabel => "My x-axis label",
ylabel => "My y-axis label",
....
gnuplot => "dramaqueen.exe",
);
http://search.cpan.org/~kwmak/Chart-Gnuplot-0.05/lib/Chart/Gnuplot.pm#gnuplot | [reply] [d/l] |
|
| [reply] [d/l] |
|
| [reply] [d/l] [select] |
|
|
|
|
However, also in this case I get an Invalid Parameter - 90 error message
I'm starting to get the feeling that the gnuplot executable and wgnuplot.exe must take different arguments.
Cheers, Rob
| [reply] [d/l] |
|
Hmm, works for me :/
I used
gp424win32.zip from
here.
I also removed DIR => '/tmp' from Gnuplot.pm, because I like my existing temp directory just fine.
| [reply] [d/l] |
|
|
Re: Chart::Gnuplot and Windows XP by BrowserUk (Apostle) on Nov 05, 2008 at 23:38 UTC |
A little more information now I've gotten to downloading the gnuplot package. There seem to be a lot of problems with Chart::Gnuplot.
Amongst others,
- you need to code the output file thusly: output => 'c:\\\\test\\\\test.png', in order to get 'c:\\test\\test.png' into the command file. Otherwise you get the Invalid Parameter - 90 error.
You'll also get that same error if the output file already exists.
- The output produced (once you get it to actually produce output!), is initially not the .png you are specify, but rather an EPS format file. (with a .png extension).
Chart::Gnuplot then goes looking for a convert utility (from the ImageMagick distribution), to translate that into the required .png (gif, bmp etc.)
Depending upon the output format required, it will also go looking for a couple of other utilities, ps2pdf, pdf2ps which are also not a part of the distribution. I'm not sure where they come from.
It looks like it would take some serious work (and therefore a serious need!) to get this working under windows.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] [select] |