help-octave
[Top][All Lists]
Advanced

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

Re: Re: A Gnuplot question


From: Tatsuro MATSUOKA
Subject: Re: Re: A Gnuplot question
Date: Fri, 28 Nov 2008 18:47:04 +0900 (JST)

Hello

Is loadpath in gnuplot helpful for you ?
Sorry when I am mislesding your situation.

Regards

Tatsuro  

gnuplot> help loadpath
 The `loadpath` setting defines additional locations for data and command
 files searched by the `call`, `load`, `plot` and `splot` commands.  If a
 file cannot be found in the current directory, the directories in
 `loadpath` are tried.

 Syntax:
       set loadpath {"pathlist1" {"pathlist2"...}}
       show loadpath

 Path names may be entered as single directory names, or as a list of
 path names separated by a platform-specific path separator, eg. colon
 (':') on Unix, semicolon (';') on DOS/Windows/OS/2/Amiga platforms.
 The `show loadpath`, `save` and `save set` commands replace the
 platform-specific separator with a space character (' ') for maximum
 portability.

 If the environment variable GNUPLOT_LIB is set, its contents are
 appended to `loadpath`.  However, `show loadpath` prints the contents
 of user defined loadpath and system loadpath separately.  Also, the
 `save` and `save set` commands save only the user specified parts of
 `loadpath`, for portability reasons.

--- Vic Norton  wrote:
> Here's the situation.
> 
> The first lines of a gnuplot script are
> 
>     #!/usr/local/bin/gnuplot
> 
>     ## SE_2006-09-15_rank9.plot
> 
>     cd "~/octave/Markowitz_critical_line/Gnuplot";
>     load 'data/assetSEpoints_2006-09-15_rank9.pts';
>     load 'data/efficientFunctions_2006-09-15_rank9.fcn';
> 
> I want to distribute the folder, "Markowitz_critical_line", but  
> clearly the gnuplot code is NOT portable unless a receiver of the  
> distribution puts this "Markowitz_critical_line" folder in his own "~/ 
> octave" directory.
> 
> The gnuplot script is in "Markowitz_critical_line/Gnuplot"; so what I  
> really want is
> 
>     cd HERE;
> 
> where HERE is the directory of the calling script. Then the next two  
> "load" lines will work fine no matter where someone puts the  
> "Markowitz_critical_line" folder.
> 
> So my question is this: How do you define HERE in gnuplot?
> 
> In octave
> 
>     HERE = fileparts(mfilename("fullpath"));
> 
> Regards,
> 
> Vic
> 
> On Nov 26, 2008, at 7:53 PM, Vic Norton wrote:
> > Unfortunately "help cd" is no help, Thomas.
> > Syntax:
> >      cd '<directory-name>'
> > works if you know the directory-name. I want the Gnuplot script to
> > tell me the name of the directory in which it resides. Then the code
> > will be portable.
> >
> 
> 
> On Nov 26, 2008, at 8:36 PM, Ben Abbott wrote:
> 
> > I don't see what that has to do with making code portable. Can you  
> > be more specific?
> 
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>

--------------------------------------
Power up the Internet with Yahoo! Toolbar.
http://pr.mail.yahoo.co.jp/toolbar/


reply via email to

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