help-octave
[Top][All Lists]
Advanced

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

Re: gnuplot_x11 driver with octave.app/gnuplot.app on Mac


From: Henry F. Mollet
Subject: Re: gnuplot_x11 driver with octave.app/gnuplot.app on Mac
Date: Sat, 04 Aug 2007 11:55:22 -0700
User-agent: Microsoft-Entourage/11.1.0.040913

Thanks, Tomas;
I've made the suggested changes in gnuplot (in line 56 after "export
GNUPLOT_PS_DIR... fi")  and it works when starting with gnuplot (see below).
I can also switch between AquaTerm and x11 after invoking gnuplot.

However, when starting with octave, I still have the same problem (see
below). I have not yet tried to change __gnuplot_version__.m and/or
drawnow.m.  I have seen additional emails regarding this and have to study
them more carefully to better understand.
Henry

henry-f-mollets-emac:~ hfm$ export GNUTERM=x11
henry-f-mollets-emac:~ hfm$
/Applications/Gnuplot.app/Contents/Resources/bin/gnu
plot

        G N U P L O T
        Version 4.2 patchlevel 0
        last modified March 2007
        System: Darwin 8.10.0

Terminal type set to 'x11'
gnuplot> plot sin(x)

gnuplot> GNUTERM=aqua
         undefined variable: aqua
gnuplot> set term aqua
Terminal type set to 'aqua'
Options are '0 title "Figure 0" size 846 594 font "Times-Roman,14"
noenhanced so
lid'
gnuplot> plot cos(x)

gnuplot> set term x11
Terminal type set to 'x11'
Options are '0'
gnuplot> plot tan(x)

gnuplot> 
*********************
henry-f-mollets-emac:~ hfm$ export GNUTERM=x11
henry-f-mollets-emac:~ hfm$
/Applications/Octave.app/Contents/Resources/bin/octa
ve
GNU Octave, version 2.9.13
Copyright (C) 2007 John W. Eaton and others.

octave-2.9.13:1> fplot('cos',[0,2*pi])
# still using AquaTerm
octave-2.9.13:2> 
*********************



on 8/4/07 2:48 AM, Thomas Treichl at address@hidden wrote:

> 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)/x
> 
> I 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




reply via email to

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