views:

3193

answers:

4

Greetings,

I'm the only person in my Numerical Analysis class attempting to do all of the MatLab based homework assignments in Octave - the opensource representation of MatLab.

However, I'm having problems getting graphs to plot and I think it's a simple linking problem. I am running: -Mac OS X Snow Leopard (10.6) -Octave 3.2.2 -Aquaterm 1.0.1 -GNUPlot 4.0

Here is an example of the errors that I am getting from my shell:

Mr-Buffalo:~ buffingtonr$ gnuplot 
dyld: Library not loaded: /usr/local/lib/libaquaterm.1.0.0.dylib
  Referenced from: /usr/local/bin/gnuplot
  Reason: image not found
Trace/BPT trap


octave-3.2.2:1> f = inline('x^2')

f(x) = x^2

octave-3.2.2:5> ezplot(f)
dyld: Library not loaded: /usr/local/lib/libaquaterm.1.0.0.dylib
  Referenced from: /usr/local/bin/gnuplot
  Reason: image not found
dyld: Library not loaded: /usr/local/lib/libaquaterm.1.0.0.dylib
  Referenced from: /usr/local/bin/gnuplot
  Reason: image not found
error: you must have gnuplot installed to display graphics; if you have gnuplot installed in a non-standard location, see the 'gnuplot_binary' function
octave-3.2.2:6>

I don't have the unix foundation necessary to trouble shoot this and sadly to say, my first hw assignment is due later today. I'm not too worried about actually "completing" homework but I would like to get Octave graphing. Any suggestions/fixes?

Thanks!

+1  A: 

You have aquaterm 1.0.1 installed, and gnuplot is referencing 1.0.0, which you apparently do not have installed on your system.

I'm not terribly familiar with installing a library on a Mac, but you might be able to just grab the 1.0.0 .dmg file from the Aquaterm files page on Sourceforge.

Alternatively, the newest version of octave or gnuplot might reference the newer library, so you might be able to just upgrade one of those instead.


It's a real hack, but I saw a couple places (including this mailing list) suggesting you just link 1.0.0 to your 1.0.1 library. This isn't usually acceptable, because there's no guarantee the libraries are cross-compatible. It would at least be a quick fix so you can get your homework done in time!

Mark Rushakoff
A: 

New Progress

When I investigated '/usr/local/lib/', I found that there was a symbolic-link in the directory:

aquaterm-1.0.0 -> /Library/Frameworks/AquaTerm.framework/Versions/A/AquaTerm

So I created a similar sym-link to make the file gnuplot is looking for (...1.0.1) point to the default AquaTerm location:

aquaterm-1.0.1 -> /Library/Frameworks/AquaTerm.framework/Versions/A/AquaTerm

This fixes the gnuplot launching issue. I verified that gnuplot successfully plots on its own by plotting a function:

Terminal type set to 'x11'
gnuplot> plot sin(x)


Now I get new errors in Octave:

octave-3.2.2:7> ezplot(f=inline('sin(x)'))

gnuplot> set terminal aqua enhanced title "Figure 1"
                      ^
         line 0: You can't change the terminal in multiplot mode


gnuplot> if (exists("GPVAL_TERM")) print GPVAL_TERM; else print NaN
                    ^
         line 0: invalid expression 

error: Invalid call to strcat.  Correct usage is:

 -- Function File:  strcat (S1, S2, ...)

However, I have verified that gnuplot 4.0 is installed and does, in fact, plot graphs. So now it seems the error is in the communication between Octave and GNUPlot. I will try updating to a newer version of gnuplot if possible and report back.

-Buffalo

Buffalo
A: 

the problem could be related to this http://macresearch.org/gnuplot-aquaterm-snow-leopard-1061 in the answer: Fri, 2009-09-18 01:59 — TeGa

A: 

Did you come to any conclusions about the new problem? I am having the same trouble.

Pete

Pete
Yes, I ended up fixing my problem by simply installing the newest versions of all these software applications. After waiting a month or so, I guess the bugs had been worked out - because it all worked after the reinstall. If I retook the class over again, I definitely would have just put out the cash for MatLab. It's really cool software and worth the money. Learning the open-source "hacker" way was fun but caused more than a few headache and made the very difficult class a little more unbearable.
Buffalo
Nice. I just updated to the newer version of gnuplot (ver 4.4) from 4.0. Everything works fine now, so thank you for that. I am curious about why it didn't work with the previous version though. Thank you for your time.
Pete