help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave installation Windows 7


From: Ben Abbott
Subject: Re: Octave installation Windows 7
Date: Fri, 21 Sep 2012 09:13:09 -0400

On Sep 21, 2012, at 5:20 AM, sfm1 wrote:

> Still no success *.png is not creauted
> 
> I get the following message from debugger
> 
> octave-3.6.2.exe:3> fplot("[cos(x),sin(x)]",[0,2*pi]);
> octave-3.6.2.exe:4> print -debug figtest3.png
> Ghostscript command: 'C:\Program\gs\gs9.06\bin/gs.exe -dQUIET -dNOPAUSE
> -dBATCH
> -dSAFER -sDEVICE=png16m -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r150x150
> -dEPSC
> rop -sOutputFile=figtest3.png -'
> fltk-pipeline: 'C:\Program\gs\gs9.06\bin/gs.exe -dQUIET -dNOPAUSE -dBATCH
> -dSAFE
> R -sDEVICE=png16m -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r150x150
> -dEPSCrop -s
> OutputFile=figtest3.png 
> 
> Is there a problem with slash / backslash \ in the gs directory? 
> Setting "C:\\Program Files\\gs\\gs9.06\\bin\\" has no nimpact on the debug
> message. 
> 
> Marx

If the double back-slash worries you, they may be avoided by using 
single-quotes.

I'm using the GPL version of Ghostscript.  To allow Octave to find it, its 
location must be placed in the command shell's path.  So, on my system the 
following is needed.

        gs_path = 'C:\Program Files (x86)\GPLGS\';
        setenv ("path", strcat (getenv ("path"), pathsep (), gs_path);

This results in the warnings ...

        warning: print.m: epstool binary is not available.
        Some output formats are not available.
        warning: print.m: fig2dev binary is not available.
        Some output formats are not available.
        warning: print.m: pstoedit binary is not available.
        Some output formats are not available.

On your system the following should work ...

        gs_path = 'C:\Program\gs\gs9.06\bin\';
        setenv ("path", strcat (getenv ("path"), pathsep (), gs_path);

To resolve the warnings each of those utilities need to be installed and their 
locations also added to the command shell's path.

Adding a snippet like below to your ~/.octaverc file will set the command shell 
path for you each time you run octave. 

        cmd_path = getenv ("path");
        gs_path = 'C:\Program\gs\gs9.06\bin\';
        if (isempty (strfind (cmd_path, gs_path)))
                setenv ('path', strcat (cmd_path, pathsep (), gs_path));
        endif

Ben




reply via email to

[Prev in Thread] Current Thread [Next in Thread]