3

Mac Os X (10.6.8) の gnuplot で tikz ターミナルを有効にするにはどうすればよいですか?

私はtikzが動作するラテックスを持っています。http://www.lua.org/から lua をインストールし、gnuplot4.4.4 をダウンロードして解凍し、実行しました。

$ ./configure
$ sudo make
$ sudo make install

これでtikz端末を設定できるようになりましたが、まだ問題があります

gnuplot> set terminal tikz
Terminal type set to 'tikz'
Options are 'color dashed'
gnuplot> plot sin(x)
\begin{tikzpicture}[gnuplot]
         /usr/local/share/gnuplot/4.4/lua/gnuplot-tikz.lua:252: bad argument #7 to 'format' (string expected, got no value)
stack

gnuplot> 

Java Developer Update を実行していませんが、https://github.com/mxcl/homebrew/wiki/installationから自作をインストールしようとしましたが、これは必要ですか? 「brew install gnuplot」で glib 依存関係の問題が発生するようになりました

hpek@melda:~$ brew install glib
/usr/local/Library/Homebrew/global.rb:43: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
/usr/local/bin/brew:74: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
/usr/local/Library/Homebrew/build.rb:7: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
==> Downloading ftp://ftp.gnome.org/pub/gnome/sources/glib/2.28/glib-2.28.8.tar.bz2
File already downloaded in /Users/hpek/Library/Caches/Homebrew
==> Downloading patches

curl: (22) The requested URL returned error: 404
######################################################################## 100.0%
######################################################################## 100.0%
######################################################################## 100.0%
######################################################################## 100.0%
######################################################################## 100.0%
==> Patching
/usr/bin/patch: **** Can't open patch file 001-homebrew.diff : No such file or directory
Error: Failure while executing: /usr/bin/patch -f -p0 -i 001-homebrew.diff
hpek@melda:~$ 

gnuplot を手動でインストールする場合、これらすべての依存関係を自分で把握してインストールする必要がありますか?

4

2 に答える 2

1

問題は、LUA スクリプトの 252 (または私のバージョンでは 254) が必要以上に引数の少ない format コマンドを使用していることです。5 番目の引数 (別名スクリプト リビジョン番号) として "X" を追加すると、これが解決されます。

スクリプト内の新しいコードは次のとおりです。

gp.write(string.format("%%%% generated with GNUPLOT %sp%s (%s; terminal rev. %s, script rev. %s)\n%%%% %s\n",
      term.gp_version, term.gp_patchlevel,
      string.sub(term.lua_term_revision,7,-3),"x",
      pgf.REVISION,os.date()))

スクリプトのリビジョン番号がどこにあるかを知っていれば、もっと良いことがあると思います。

于 2012-01-04T08:53:34.723 に答える
0

試す:

brew update

その後、もう一度試してください。これは現在修正されているようです。

于 2011-12-01T18:29:43.503 に答える