Need help on octave - simple plot

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Need help on octave - simple plot

tandiwijaya
Hi,

I'm newbie, and just downloaded the octave 3.4.0 in Max OS X 10.7.3.

Im trying to do a simple plot and found the following error message:

code starts here:
=========
octave-3.4.0:1> x=[1 2]
x =

   1   2

octave-3.4.0:2> y=[3 4]
y =

   3   4

octave-3.4.0:3> plot(x)
error: popen2: popen2 (child): unable to start process -- Operation not permitted
error: called from:
error:   /Applications/Octave.app/Contents/Resources/share/octave/3.4.0/m/plot/__gnuplot_open_stream__.m at line 30, column 44
error:   /Applications/Octave.app/Contents/Resources/share/octave/3.4.0/m/plot/__gnuplot_drawnow__.m at line 72, column 19
sh: /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: /bin/sh: bad interpreter: Operation not permitted
error: `unset' undefined near line 4 column 1
warning: broken pipe -- some output may be lost
=========
code stopped here

Please help how how to solve this problem.

Thank You

Tandi.
Reply | Threaded
Open this post in threaded view
|

Re: Need help on octave - simple plot

marco atzeri-2
On 2/27/2012 3:54 AM, tandiwijaya wrote:

> Hi,
>
> I'm newbie, and just downloaded the octave 3.4.0 in Max OS X 10.7.3.
>
> Im trying to do a simple plot and found the following error message:
>
> code starts here:
> =========
> octave-3.4.0:1>  x=[1 2]
> x =
>
>     1   2
>
> octave-3.4.0:2>  y=[3 4]
> y =
>
>     3   4
>
> octave-3.4.0:3>  plot(x)
> error: popen2: popen2 (child): unable to start process -- Operation not
> permitted
> error: called from:
> error:
> /Applications/Octave.app/Contents/Resources/share/octave/3.4.0/m/plot/__gnuplot_open_stream__.m
> at line 30, column 44
> error:
> /Applications/Octave.app/Contents/Resources/share/octave/3.4.0/m/plot/__gnuplot_drawnow__.m
> at line 72, column 19
> sh: /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: /bin/sh: bad
> interpreter: Operation not permitted
> error: `unset' undefined near line 4 column 1
> warning: broken pipe -- some output may be lost
> =========
> code stopped here
>
> Please help how how to solve this problem.
>
> Thank You
>
> Tandi.

have you looked at
http://www.octave.org/wiki/index.php?title=Installing_MacOS_X_Bundle

instructions ?

Regards
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Need help on octave - simple plot

bpabbott
Administrator
In reply to this post by tandiwijaya
On Feb 26, 2012, at 9:54 PM, tandiwijaya wrote:

> Hi,
>
> I'm newbie, and just downloaded the octave 3.4.0 in Max OS X 10.7.3.
>
> Im trying to do a simple plot and found the following error message:
>
> code starts here:
> =========
> octave-3.4.0:1> x=[1 2]
> x =
>
>   1   2
>
> octave-3.4.0:2> y=[3 4]
> y =
>
>   3   4
>
> octave-3.4.0:3> plot(x)
> error: popen2: popen2 (child): unable to start process -- Operation not
> permitted
> error: called from:
> error:  
> /Applications/Octave.app/Contents/Resources/share/octave/3.4.0/m/plot/__gnuplot_open_stream__.m
> at line 30, column 44
> error:  
> /Applications/Octave.app/Contents/Resources/share/octave/3.4.0/m/plot/__gnuplot_drawnow__.m
> at line 72, column 19
> sh: /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: /bin/sh: bad
> interpreter: Operation not permitted
> error: `unset' undefined near line 4 column 1
> warning: broken pipe -- some output may be lost
> =========
> code stopped here
>
> Please help how how to solve this problem.
>
> Thank You
>
> Tandi.

Did you install gnuplot ?

It is in the "Extras" folder of the Octave dmg.

Also, note the README file.

http://sourceforge.net/projects/octave/files/Octave%20MacOSX%20Binary/2011-04-21%20binary%20of%20Octave%203.4.0/

There was a bug that accompanied the gnuplot in the Extras folder. For 10.7.3 you'll need to use one of the work-arounds documented in the README file

Ben


_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Need help on octave - simple plot

tandiwijaya
In reply to this post by tandiwijaya
Hi Ben,

Thanks for your input. Im pretty sure i did have gnuplot in the same folder as the octave, which is the application folder. I did opened the content/resource/bin - gnuplot and inserted "FALLBACK_" to "DYLD_LIBRARY_PATH" became "DYLD_FALLBACK_LIBRARY_PATH".

Not sure if i did installation correctly but as soon as i opened the octavexxx.dmg, it has an Extra folder, and see the gnuplotxxx.dmg. double click this file, and it shows gnuplot app with the greenish icon. Drag this to the Application folder, and it moved there. Then I went to content/resourse/bin and replaces 4 instances of the "DYDL_xxxx". Saved it and closed it.

Re-open octave and do plot again, same error message appear.

Tandi.
Reply | Threaded
Open this post in threaded view
|

Re: Need help on octave - simple plot

tandiwijaya
In reply to this post by marco atzeri-2
Hello,

Thanks for your feedback. I may missed this step. Let me check it out first and i will update you again with the result.

Tandi.
Reply | Threaded
Open this post in threaded view
|

Re: Need help on octave - simple plot

bpabbott
Administrator
In reply to this post by tandiwijaya

On Feb 27, 2012, at 8:19 AM, tandiwijaya wrote:

> Hi Ben,
>
> Thanks for your input. Im pretty sure i did have gnuplot in the same folder
> as the octave, which is the application folder. I did opened the
> content/resource/bin - gnuplot and inserted "FALLBACK_" to
> "DYLD_LIBRARY_PATH" became "DYLD_FALLBACK_LIBRARY_PATH".
>
> Not sure if i did installation correctly but as soon as i opened the
> octavexxx.dmg, it has an Extra folder, and see the gnuplotxxx.dmg. double
> click this file, and it shows gnuplot app with the greenish icon. Drag this
> to the Application folder, and it moved there. Then I went to
> content/resourse/bin and replaces 4 instances of the "DYDL_xxxx". Saved it
> and closed it.
>
> Re-open octave and do plot again, same error message appear.
>
> Tandi.

If you edited the file using TextEdit, did you have it with plain text encoding "Unicode (UTF-8)" ?

Ben


_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Need help on octave - simple plot

tandiwijaya
Hi Ben,

Just checked again with the text editor. I did see the format is Plain Text and Unicode UFT-8.

Problem still there. Any other place that I can check?

Thanks for your input.

Tandi.
Reply | Threaded
Open this post in threaded view
|

Re: Need help on octave - simple plot

bpabbott
Administrator

On Feb 28, 2012, at 2:19 PM, tandiwijaya wrote:

> Hi Ben,
>
> Just checked again with the text editor. I did see the format is Plain Text
> and Unicode UFT-8.
>
> Problem still there. Any other place that I can check?
>
> Thanks for your input.
>
> Tandi.

Lets assume you installed the apps correctly, and there is something else wrong.

From Octave, try the following.

getenv SHELL
ans = /bin/sh
getenv GNUTERM
ans = aqua
system ("which gnuplot")
/opt/local/bin/gnuplot
ans = 0
gnuplot_binary
ans = gnuplot

I'm not running Octave.app, so your results will be different

Ben
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave