Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Chart::Gnuplot and Windows XP

by BrowserUk (Patriarch)
on Nov 05, 2008 at 11:25 UTC ( [id://721611]=note: print w/replies, xml ) Need Help??


in reply to Chart::Gnuplot and Windows XP

'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.

Replies are listed 'Best First'.
Re^2: Chart::Gnuplot and Windows XP
by dHarry (Abbot) on Nov 05, 2008 at 12:36 UTC

    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.

      I suspect, but am not in a position to confirm just now, that the problem is this forward slash:

      \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.

        You're right BrowserUK.

        I have upgraded to version 005 of GnuPlot and it is corrected in that version. However the error message still remains. I suspect it’s the _thaw method. Reading the TODO for the sub the author is well aware of the problem. I changed CLEANUP => 1 into => 0 and the created plot file looks correct to me. The argument created for gnuplot is still flawed, e.g. \tmp\L9LpBMXAW0/plot. I will dig a little deeper.

        Update
        Fixed typo

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://721611]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-03-28 17:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found