help-octave
[Top][All Lists]
Advanced

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

Re: gnuplot 4.5


From: rpf
Subject: Re: gnuplot 4.5
Date: Wed, 11 Nov 2009 15:35:20 +0100

You're right :

octave:1> [status,output] = system("which gnuplot")
status = 0
output = /usr/bin/gnuplot

Then I tried

octave:3> [status,output] = system("echo $PATH")

which yields

status = 0
output = 
/usr/lib/octave/3.0.1/site/exec/x86_64-pc-linux-gnu:/usr/lib/octave/api-v32/site/exec/x86_64-pc-linux-gnu:/usr/lib/octave/site/exec/x86_64-pc-linux-gnu:/usr/lib/octave/3.0.1/exec/x86_64-pc-linux-gnu:/usr/bin:$PATH

Where $PATH is the variable set in my .bashrc. Why does octave add
/usr/bin to my path? That is what is causing the "wrong" gnuplot to be
called.

On Wed, Nov 11, 2009 at 1:58 PM, Ben Abbott <address@hidden> wrote:
>
> On Nov 11, 2009, at 6:19 AM, address@hidden wrote:
>
>>
>> On Tue, Nov 10, 2009 at 8:11 PM, Søren Hauberg <address@hidden> wrote:
>>> tir, 10 11 2009 kl. 19:53 +0100, skrev address@hidden:
>>>> When I now set the path to the gnuplot 4.5 executable with
>>>> gnuplot_binary("/my/home/usr/bin/gnuplot") , I still cannot get the
>>>> zoom to work. The zooming does work, when I just run gnuplot by
>>>> itself, so the problem is within octave. When I call
>>>> __gnuplot_version__ in octave, I get 4.2 -
>>>
>>> Did you plot anything before calling 'gnuplot_binary'? The version
>>> information is cached inside '__gnuplot_version__' meaning that it will
>>> only be computed the first time you plot something.
>>>
>>> You might want to try to call
>>>
>>>  clear __gnuplot_version__
>>>
>>> after calling 'gnuplot_binary'. Perhaps this should be done
>>> automatically when you call 'gnuplot_binary', but I'm unsure if this
>>> would have unwanted side-effects.
>>>
>>> Søren
>>>
>> thanks for the help - I got the right gnuplot to work now.
>>
>> However, I still have a problem understand which version of gnuplot
>> octave uses. On startup, it says
>>
>> gnuplot_binary
>> ans = gnuplot
>>
>> When I run
>>
>> which gnuplot
>>
>> on my terminal, I get
>>
>> /my/home/usr/bin/gnuplot
>>
>> which is exactly the version 4.5 executable I want octave to use.
>> However, if I don't call gnuplot_binary("/my/home/usr/bin/gnuplot"),
>> octave uses the gnuplot 4.2 executable from /usr/bin ! I thought I
>> could avoid that problem by adding
>> gnuplot_binary(/my/home/usr/bin/gnuplot") to my .octaverc , but I ran
>> into another problem: whichever variable gnuplot_binary writes to,
>> this variable is deleted by "clear all". Most of my scripts start with
>> clear all, so all the plotting in those scripts is done in gnuplot 4.2
>> again!
>>
>> Can someone explain this behaviour to me and maybe suggest an easy way
>> to deal with it? -
>>
>> thanks
>> --h
>
> Perhaps the path in Octave's shell is not the same are at your terminal 
> prompt?
>
> From Octave, try
>
>        [status, output] = system ("which gnuplot")
>
> Ben
>
>



reply via email to

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