Octave + GNUPlot + Aquaterm + Mac OS 10.6

时间:2009-09-08 16:49:33

标签: macos unix osx-snow-leopard octave

我正在尝试在Octave中完成所有基于MatLab的家庭作业 - MatLab的开源表示。

但是,我在绘制图表时遇到问题,我认为这是一个简单的链接问题。我在跑步: -Mac OS X Snow Leopard(10.6) -Octave 3.2.2 -Aquaterm 1.0.1 -GNUPlot 4.0

以下是我从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> 

我没有必要的unix基础来解决这个问题。有什么建议/修正吗?

4 个答案:

答案 0 :(得分:1)

您安装了aquaterm 1.0。 1 ,gnuplot引用了1.0。 0 ,您显然没有在系统上安装。

我对在Mac上安装库非常熟悉,但您可以从the Aquaterm files page on Sourceforge获取1.0.0 .dmg文件。

或者,最新版本的octave或gnuplot可能会引用较新的库,因此您可能只需升级其中一个库。


这是一个真正的黑客,但我看到几个地方(包括this mailing list)建议您只是将1.0.0链接到您的1.0.1库。这通常是不可接受的,因为不能保证库是交叉兼容的。它至少是一个快速修复,所以你可以及时完成你的作业!

答案 1 :(得分:1)

新进展

当我调查'/ usr / local / lib /'时,我发现目录中有一个符号链接:

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

所以我创建了一个类似的sym-link,使文件gnuplot正在寻找(... 1.0.1)指向默认的AquaTerm位置:

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

这解决了gnuplot启动问题。我通过绘制函数验证了gnuplot 成功绘图:

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

现在我在 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, ...)

然而,我已经确认安装了gnuplot 4.0,并且实际上是绘制图表。所以现在似乎错误在于Octave和GNUPlot之间的通信。如果可能的话,我会尝试更新到更新版本的gnuplot并报告回来。

-Buffalo

答案 2 :(得分:1)

问题可能与此有关 http://macresearch.org/gnuplot-aquaterm-snow-leopard-1061 在答案:星期五,2009-09-18 01:59 - TeGa

答案 3 :(得分:0)

这对我有用:

第1步: 用/opt/local/Library/Frameworks/AquaTerm.framework替换/Library/Frameworks/AquaTerm.framework。这将确保gnuplot编译

引用正确的64位AquaTerm库

第2步: 将/Applications/AquaTerm.app替换为/Applications/MacPorts/AquaTerm.app。这将确保正确的64位AquaTerm二进制文件位于正确的位置

源: http://slashusr.wordpress.com/2010/01/17/gnuplot-with-aquaterm-on-osx-snow-leopard/

相关问题