help-octave
[Top][All Lists]
Advanced

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

Re: gnuplot works - and now I know why (fwd)


From: Dushan Mitrovich
Subject: Re: gnuplot works - and now I know why (fwd)
Date: Fri, 21 Mar 2008 22:50:09 -0700
User-agent: VSoup v1.2.9.48Beta [OS/2]

Thomas Treichl <address@hidden> wrote:
>Dushan Mitrovich schrieb:
>>
>> Last night, before reading your message, I had put the statements
>>
>>     export DISPLAY=:0.0
>>     export GNUTERM=x11
>>
>> into both '/etc/bashrc' and '~/.profile', and the the second of these
>> also into X11's 'xinitrc' file.  But it being late, I didn't try them
>> out.  This morning I saw your email and right away tried the above com-
>> mand in Terminal, and gnuplot opened in a X11 window.  When I asked to
>> plot 'sin(x)', I GOT A PLOT!  I almost fell off my chair.
>>
>> And plotting also worked from Octave.
>>
>> Then I realized that I didn't really know whether it was your command
>> that did the trick, or my modifications last night to the 3 files.  So
>> I decided to backtrack on my actions until gnuplot doesn't work again,
>> and see which action caused the change.
>>
>> First, in Terminal, I typed your 1-line command above but with out the
>> 'DISPLAY=:0.0' part.  Everything still worked.
>>
>> Then I also removed the 'GNUTERM=x11' part; still everything worked.
>>
>> Then I commented out the 'DISPLAY=:0.0' lines in 'bashrc' and '.profile',
>> logged out and then in again; everything still worked.
>>
>> Finally, I commented out the 'GNUTERM=x11' lines in 'bashrc', '.profile',
>> and 'xinitrc', logged out and then in again; everything still worked.
>>
>> In Terminal typing 'echo $DISPLAY' produced a blank line, as expected,
>> but 'echo $GNUTERM' showed 'x11'.  This puzzled me, since I couldn't
>> think of where else the variable GNUTERM was defined.  But obviously OSX
>> knew about it.
>>
>> Then I restarted the computer, just to make sure; gnuplot still worked
>> and GNUTERM was still defined!
>>
>> So I'm thoroughly confused.  Before I couldn't get gnuplot to plot any-
>> thing, and now I can't make it NOT plot.  I suspect that the same unknown
>> OSX parameter that originally kept gnuplot from producing a plot, is now
>> insisting on a plot.
>>
>> I'll keep experimenting, but thought you'd be interested in the results
>> so far.  Any ideas what the hidden ingredient might be?
>
> Yes sure, I'm very interested about the results.
>
> Not really any ideas ;) The only thing that I thought is that it has to
> do with the variables GNUTERM and DISPLAY.  The x11 backend of Gnuplot.app
> actually never made big problems (from the little feedback I get), but
> AquaTerm made at least on 5 more systems a problem.
>
> So if you still want try bringing AquaTerm to work then I have an idea ;)
> But this is a bit more complex - I will think about it how I could make
> it the most easiest for you to try it out.

Hi Thomas, Ben, and others,

I finally uncovered which was the crucial file to make or break gnuplot
being able to plot on my Mac OS X.4.11 system.  An internet search for
the error message gnuplot produced when I asked for a plot turned up this

  http://developer.apple.com/qa/qa2001/qa1067.html

which answers the question 'How do I set environment for all processes
launched by a specific user?'.

After creating the file '~/.MacOSX/environment.plist' containing the
variable 'GNUTERM' and its value 'x11', then logging out/in, gnuplot
opened in an X11 terminal window, and was able to plot successfully.
If I destroy that file, logout/in, gnuplot doesn't plot, and doesn't
even produce an error message.  Re-introducing the file lets gnuplot
again plot correctly.  All the other places where I had tried to spe-
cify GNUTERM and DISPLAY had not made any difference on my system, ex-
cept to have gnuplot produce an error message in response to a plot
request.

So I guess now the question is, Why did the other approaches not work?
Is there something peculiar about my system setup?  I don't know the
answers.  Now I'll try setting GNUTERM=aqua in that same environment.plist
file to see if I can get plotting thru aqua.

- Dushan



reply via email to

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