|
From: | Thomas Treichl |
Subject: | Re: gnuplot_x11 driver with octave.app/gnuplot.app on Mac |
Date: | Sat, 04 Aug 2007 11:48:03 +0200 |
User-agent: | Thunderbird 2.0.0.5 (Macintosh/20070716) |
Henry F. Mollet schrieb:
I want to use gnuplot_x11 instead of AquaTerm for plots when using octave.app/gnuplot.app in xterm window. "GNUTERM=X11" does not work (see below) It works with octave-2.1.71/gnuplot-4.0 in xterm windwow. Henry henry-f-mollets-emac:~ hfm$ GNUTERM=X11 henry-f-mollets-emac:~ hfm$ /Applications/Octave.app/Contents/Resources/bin/octave 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/Gnuplot.app/Contents/Resources/bin/gnuplot: line 57: 694 Broken pipe "${ROOT}/bin/gnuplot-4.2.0" "$@" [~] -bash-2.05b 502$ locate gnuplot_x11 /Applications/GnuPlot.app/Contents/Resources/libexec/gnuplot/4.2/gnuplot_x11 /usr/local/libexec/gnuplot/4.0/gnuplot_x11
Right Henry, some is my fault.I added the following code to the file <Gnuplot.app>/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/X11.app" if [ -z ${DISPLAY} ]; then export DISPLAY=:0.0; fi if [ -z ${GNUPLOT_DRIVER_DIR} ]; then export GNUPLOT_DRIVER_DIR="${ROOT}/libexec/gnuplot/4.2" fi fi then try to run <Gnuplot.app>/Contents/Resources/bin/gnuplot and type bash$ export GNUTERM=x11 # note the lower case letter of x11 bash$ <Gnuplot.app>/Contents/Resources/bin/gnuplot gnuplot> plot sin(x)/xI can see another problem in the current CVS of octave that the version number of Gnuplot.app 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 <Octave.app>/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 <Octave.app>/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.
Thomas
[Prev in Thread] | Current Thread | [Next in Thread] |