Octave + GNUPlot + Aquaterm + Mac OS 10.6

3
我正在尝试使用Octave完成所有基于MatLab的作业任务,Octave是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个回答

1

新进展

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

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

因此,我创建了一个类似的符号链接,使得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


1

您已经安装了aquaterm 1.0.1,而gnuplot正在引用1.0.0,这显然在您的系统上没有安装。

我不太熟悉在Mac上安装库,但您可以从Sourceforge上的Aquaterm文件页面下载1.0.0 .dmg文件。

或者,最新版本的octave或gnuplot可能会引用更新的库,因此您可以尝试升级其中一个。


这是一个真正的hack,但我看到一些地方(包括这个邮件列表)建议您将1.0.0链接到您的1.0.1库。这通常是不可接受的,因为没有保证库是跨兼容的。至少这是一个快速解决方案,让您及时完成作业!


1

0

这对我行得通:

步骤1: 用 /opt/local/Library/Frameworks/AquaTerm.framework 替换 /Library/Frameworks/AquaTerm.framework。 这将确保 gnuplot 编译引用正确的64位 AquaTerm 库

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

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


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接