[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnuplot_x11 driver with on Mac

From: Thomas Treichl
Subject: Re: gnuplot_x11 driver with on Mac
Date: Sat, 04 Aug 2007 11:48:03 +0200
User-agent: Thunderbird (Macintosh/20070716)

Henry F. Mollet schrieb:
I want to use gnuplot_x11 instead of AquaTerm for plots when using in xterm window.
"GNUTERM=X11" does not work (see below)

It works with octave-2.1.71/gnuplot-4.0 in xterm windwow.

henry-f-mollets-emac:~ hfm$ GNUTERM=X11
henry-f-mollets-emac:~ hfm$

GNU Octave, version 2.9.13
Copyright (C) 2007 John W. Eaton and others.

octave-2.9.13:1> fplot('cos',[0,2*pi])
Expected X11 driver: /tmp/gnuplot-ppc/libexec/gnuplot/4.2/gnuplot_x11
See 'help x11' for more details
/Applications/ line 57:   694
Broken pipe             "${ROOT}/bin/gnuplot-4.2.0" "$@"

[~] -bash-2.05b 502$ locate gnuplot_x11

Right Henry, some is my fault.

I added the following code to the file <>/Contents/Resources/bin/gnuplot to make sure that the X11 runtime environment is opened and all necessary variables are set (if not already set). Add this code in line 56 after "export GNUPLOT_PS_DIR... fi"

  if [ "${GNUTERM}" == "x11" ]; then
    # Edit /etc/X11/xinit/xinitrc if you don't like it that an xterm is
    # opened if X11 is started.
    open "/Applications/Utilities/"
    if [ -z ${DISPLAY} ]; then export DISPLAY=:0.0; fi
    if [ -z ${GNUPLOT_DRIVER_DIR} ]; then
      export GNUPLOT_DRIVER_DIR="${ROOT}/libexec/gnuplot/4.2"

then try to run <>/Contents/Resources/bin/gnuplot and type

  bash$ export GNUTERM=x11 # note the lower case letter of x11
  bash$ <>/Contents/Resources/bin/gnuplot
  gnuplot> plot sin(x)/x

I can see another problem in the current CVS of octave that the version number of is not set correctly and because of this we get another error. I need to have a look for that and will send back a patch to the Octave bug-list (meanwhile can you please try if these changes solve the problem on your machine?). You can also work around this problem if you set

  __version__ = "4";

in line 39 of the file <>/Contents/Resources/share/octave/2.9.13/m/plot/__gnuplot_version__.m

also drawnow.m overwrites the term variable to "aqua" - a first workaround would be that you manually set "x11" in line 124 of <>/Contents/Resources/share/octave/2.9.13/m/plot/drawnow.m

  term = "x11";

Don't know if I have the time today to work on this problem but meanwhile you should be able to work with this and X11. I prepare a patch and then send this to the list.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]