문제

How do I enable the tikz terminal in gnuplot on Mac Os X(10.6.8)?

I have latex with working tikz. Now I installed lua from http://www.lua.org/ and Downloaded gnuplot4.4.4, unpacked it, and run

$ ./configure
$ sudo make
$ sudo make install

Now I can set the tikz terminal, but there are still problems

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> 

I have also tried to install homebrew from https://github.com/mxcl/homebrew/wiki/installation although I did not do the Java Developer Update - is that necessary? Now 'brew install gnuplot' gives problems with the glib dependency

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:~$ 

When I install gnuplot manually, am I suppose to know about and install all these dependencies myself?

도움이 되었습니까?

해결책

Try:

brew update

then try it again. This appears to be fixed now.

다른 팁

The problem is that the 252 (or 254 in my version) of the LUA script is using a format command with less argument than necessary. Adding a "X" as #5 argument (a.k.a. script revision number) solves this.

Here is my new code in the script:

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()))

I guess there is better to do if I knew where to find the script revision number.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top