help-octave
[Top][All Lists]
Advanced

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

Re: Problem with simple graphics


From: Ben Abbott
Subject: Re: Problem with simple graphics
Date: Mon, 20 Feb 2012 09:55:58 -0500

On Feb 20, 2012, at 9:22 AM, Bernard Abramson wrote:

> On Feb 20, 2012, at 8:17 AM, Ben Abbott wrote:
> 
>> On Feb 19, 2012, at 10:51 PM, Ben Abbott wrote:
>> 
>>> On Feb 19, 2012, at 9:34 PM, Bernard Abramson wrote:
>>> 
>>>> On Feb 19, 2012, at 9:26 PM, Ben Abbott wrote:
>>>> 
>>>>> On Feb 19, 2012, at 9:19 PM, Bernard Abramson wrote:
>>>>> 
>>>>>> On Feb 19, 2012, at 6:54 PM, Ben Abbott wrote:
>>>>>> 
>>>>>>> On Feb 19, 2012, at 1:55 PM, Bernard Abramson wrote:
>>>>>>> 
>>>>>>>> On Feb 19, 2012, at 12:26 PM, Bernard Abramson wrote:
>>>>>>>> 
>>>>>>>>> On Feb 19, 2012, at 11:19 AM, Ben Abbott wrote:
>>>>>>>>> 
>>>>>>>>>> *** please reply-all so that others may benefit from our exchange ***
>>>>>>>>>> 
>>>>>>>>>> *** also respond at the bottom so that the entire exchange can be 
>>>>>>>>>> read from top to bottom ***
>>>>>>>>>> 
>>>>>>>>>> On Feb 19, 2012, at 10:28 AM, Bernard Abramson wrote:
>>>>>>>>>> 
>>>>>>>>>>> On Feb 18, 2012, at 9:36 PM, Ben Abbott wrote:
>>>>>>>>>>> 
>>>>>>>>>>>> On Feb 18, 2012, at 5:40 PM, Bernard Abramson wrote:
>>>>>>>>>>>> 
>>>>>>>>>>>>> I have the current version of Octave (3.4.0) running on the 
>>>>>>>>>>>>> current version of Mac OS X.  I have installed Gnuplot.  I have 
>>>>>>>>>>>>> corrected the  DYLD_LIBRARY_PATH problem in  Gnuplot-4.4.3.  
>>>>>>>>>>>>> However, when I appempt to plot in Octave I obtain:
>>>>>>>>>>>>> 
>>>>>>>>>>>>> octave-3.4.0:1> sombrero(25)
>>>>>>>>>>>>> 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 2 column 1
>>>>>>>>>>>>> warning: broken pipe -- some output may be lost
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Any suggestions?
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Sincerely,
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Bernard Abramson
>>>>>>>>>>>> 
>>>>>>>>>>>> What do you get when you type ...
>>>>>>>>>>>> 
>>>>>>>>>>>>    system ('which gnuplot')
>>>>>>>>>>>> 
>>>>>>>>>>>> ... I get ...
>>>>>>>>>>>> 
>>>>>>>>>>>>    /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot
>>>>>>>>>>>> 
>>>>>>>>>>>> If so, what happens when you type ? ....
>>>>>>>>>>>> 
>>>>>>>>>>>>    system gnuplot
>>>>>>>>>>>> 
>>>>>>>>>>>> By "current verrsion of MacOS X do you refer to 10.7.3?
>>>>>>>>>>>> 
>>>>>>>>>>>> Ben
>>>>>>>>>>>> 
>>>>>>>>>>> Ben,
>>>>>>>>>>> 
>>>>>>>>>>> Thanks for the quick reply.
>>>>>>>>>>> 
>>>>>>>>>>> system('which gnuplot')
>>>>>>>>>>> 
>>>>>>>>>>> yields the same answer you quoted.
>>>>>>>>>>> 
>>>>>>>>>>> system gnuplot
>>>>>>>>>>> 
>>>>>>>>>>> yields:
>>>>>>>>>>> 
>>>>>>>>>>> sh: /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: 
>>>>>>>>>>> /bin/sh: bad interpreter: Operation not permitted
>>>>>>>>>>> ans =  126
>>>>>>>>>>> 
>>>>>>>>>>> Yes, I'm using OS X 10.7.3
>>>>>>>>>>> 
>>>>>>>>>>> Any suggestions will be appreciated.  Whatever is wrong must be 
>>>>>>>>>>> minor as there ought to be many many successful installations of 
>>>>>>>>>>> Octave on Mac.
>>>>>>>>>>> 
>>>>>>>>>>> Bernard
>>>>>>>>>> 
>>>>>>>>>> It looks like the change you made to the gnuplot script introduced a 
>>>>>>>>>> syntax error.
>>>>>>>>>> 
>>>>>>>>>> Any chance you edited the file below with Textedit ?
>>>>>>>>>> 
>>>>>>>>>>      /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot
>>>>>>>>>> 
>>>>>>>>>> If so, you'll need to be sure to save it as plain text. When saving 
>>>>>>>>>> be sure you select "Plain Text Encoding [Unicode (UTF-8)] and 
>>>>>>>>>> uncheck the box to make sure ".txt" isn't used as an extension.
>>>>>>>>>> 
>>>>>>>>>> If the gnuplot script was saved correctly, then I suspect you made a 
>>>>>>>>>> mistake in modifying it ... or the instructions you followed 
>>>>>>>>>> contained a mistake.
>>>>>>>>>> 
>>>>>>>>>> We recently updated the instructions for fixing gnuplot under Lion. 
>>>>>>>>>> See the README at the link below.
>>>>>>>>>> 
>>>>>>>>>> http://sourceforge.net/projects/octave/files/Octave%20MacOSX%20Binary/2011-04-21%20binary%20of%20Octave%203.4.0/
>>>>>>>>>> 
>>>>>>>>>> Ben
>>>>>>>>> 
>>>>>>>>> Ben,
>>>>>>>>> 
>>>>>>>>> Yes I did use TextEdit to make the 4 changes to the DYLD_LIBRARY_PATH 
>>>>>>>>> in gnuplot listed at 
>>>>>>>>> http://sourceforge.net/projects/octave/files/Octave%20MacOSX%20Binary/2011-04-21%20binary%20of%20Octave%203.4.0/
>>>>>>>>> 
>>>>>>>>> So I reinstalled gnuplot.app, edited the file gnuplot using emacs and 
>>>>>>>>> re-ran Octave.  This time no error message, AquaTerm started but no 
>>>>>>>>> plot window opened.  I think that I'm only one step away from having 
>>>>>>>>> this working so your help is much appreciated.
>>>>>>>>> 
>>>>>>>>> Bernard
>>>>>>>> 
>>>>>>>> OK, progress.  I included the line
>>>>>>>> 
>>>>>>>> setenv("GNUTERM","x11")
>>>>>>>> 
>>>>>>>> and obtained plots.  However,
>>>>>>>> 
>>>>>>>> setenv("GNUTERM","aqua")
>>>>>>>> 
>>>>>>>> causes Aquaterm to open but nothing is plotted.
>>>>>>>> 
>>>>>>>> Bernard
>>>>>>> 
>>>>>>> Try running gnuplot directly. 
>>>>>>> 
>>>>>>> If the terminal isn't set to aqua by default, type ...
>>>>>>> 
>>>>>>>         set terminal aqua
>>>>>>> 
>>>>>>> Then type
>>>>>>> 
>>>>>>>         plot sin(x)
>>>>>>> 
>>>>>>> Do you get a plot ?
>>>>>>> 
>>>>>>> Ben
>>>>>> 
>>>>>> Thanks.  I set the terminal to aqua in Gnuplot.  When I entered 
>>>>>> 
>>>>>> plot sin(x)
>>>>>> 
>>>>>> Aquaterm starts but nothing happens.
>>>>>> 
>>>>>> If I set the terminal to x11 and enter the plot command I get the right 
>>>>>> output.
>>>>>> 
>>>>>> Bernard
>>>>> 
>>>>> Ok. I'm out of ideas. Maybe someone else will have a suggestion. If you 
>>>>> really want to use aqua, you might try the 4.2.6 gnuplot that is bunded 
>>>>> with Maxima.
>>>>> 
>>>>> Since you are using 3.4.0, you might want to try the experimental OpenGL 
>>>>> toolkit.
>>>>> 
>>>>>   close all
>>>>>   graphics_toolkit fltk
>>>>> 
>>>>> After than try your plots.
>>>>> 
>>>>> From gnuplot you might also try ...
>>>>> 
>>>>>   set term
>>>>> 
>>>>> That will tell you what terminals are available. If wxt is there, you 
>>>>> might try that as well.
>>>>> 
>>>>>   close all
>>>>>   setenv GNUTERM wxt
>>>>>   graphics_toolit gnuplot
>>>>> 
>>>>> and then try you plots.
>>>>> 
>>>>> Ben
>>>> 
>>>> Ben,
>>>> 
>>>> Thanks for trying.  This is not the first time I've run up against OS X 
>>>> problems -- I had a hard time getting Eclipse to run Fortran (yes, I'm a 
>>>> really ancient Fortran programmer).  I got there in the end.
>>>> 
>>>> By the way, Gnuplot tells me it's version 4.4 patch level 3 and I thought 
>>>> I saw somewhere that it's bundled with Aqua so it really ought to work out 
>>>> of the box.
>>>> 
>>>> Bernard
>>> 
>>> You should check to be sure that gnuplot isn't running a version of 
>>> Aquaterm you had installed previously. If it is installed it will be in 
>>> Applications or a directory thereof. 
>>> 
>>> If there is no other Aquaterm, then I have a bit of a wild guess. Edit the 
>>> gnuplot script again and find the lines below. Remove the "#"s seen below.
>>> 
>>> if [ -z ${GNUTERM} ]; then
>>> GNUTERM="aqua"
>>> #  DYLD_FRAMEWORK_PATH="${ROOT}/lib:${DYLD_FRAMEWORK_PATH}" \
>>> #    open "${ROOT}/lib/AquaTerm.app"
>>> fi
>>> 
>>> Then start Octave and try ...
>>> 
>>>     setenv ("GNUTERM", "")
>>>     plot (1:10)
>>> 
>>> Ben
>> 
>> I tried this. Aquaterm runs and the plot shows up (as it did before). I then 
>> click-n-hold on Aquaterm in the Dock until the menu appears. Then I select 
>> [Options -> Show in Finder]. This verified that the correct Aquaterm is 
>> running.
>> 
>> If  you do the same and find that the correct Aquaterm is running, the I'd 
>> suspect some library that Aquaterm uses is not installed for you.
>> 
>> Ben
>> 
> 
> I think that takes care of everything.  Plotting happens in Aqua, no errors 
> of any kind, and the version of Aqua that Gnuplot runs is the one that was 
> installed with Gnuplot (anyway I deleted the copy I installed directly 
> myself).
> 
> Thank you very much.
> 
> Given the number of scientific users who use Macs and the number who require 
> linear algebra one would have thought this would have been sorted out long 
> ago!
> 
> Regards,
> 
> Bernard

We're looking into a providing a more robust Octave.app.

For now the most convenient approach is to use a package management system. The 
three most popular on MacOS are Fink, Macports, and Homebrew.

Ben




reply via email to

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