Is there a way to change the gnuplot home directory permanently to a home/user/gnuplot directory without typing
cd home/user/gnuplot
after every gnuplot start?
Is there a way to change the gnuplot home directory permanently to a home/user/gnuplot directory without typing
cd home/user/gnuplot
after every gnuplot start?
After looking around I found this link: http://www.gnuplot.info/docs_4.2/gnuplot.html#x1-6900018
Which has the following info:
18 Start-up
When gnuplot is run, it looks for an initialization file to load. This file is called .gnuplot on Unix and AmigaOS systems, and GNUPLOT.INI on other systems. If this file is not found in the current directory, the program will look for it in the HOME directory (under AmigaOS, Atari(single)TOS, MS-DOS, Windows and OS/2, the environment variable GNUPLOT should contain the name of this directory; on Windows NT, it will use USERPROFILE if GNUPLOT isn’t defined). Note: if NOCWDRC is defined during the installation, gnuplot will not read from the current directory.
If the initialization file is found, gnuplot executes the commands in it. These may be any legal gnuplot commands, but typically they are limited to setting the terminal and defining frequently-used functions or variables.
which means that it reads into your home directory if the file is not found BUT it also checks for the GNUPLOT variable which contains the name of this directory. So just jumping into a conclusion I have not tested since I do not have gnuplot but yo might like to try it you can do something like this in the terminal:
GNUPLOT = /home/user/gnuplot
that way you set the GNUPLOT variable to that particular value. Before doing this I recommend to see what value GNUPLOT has before. type this: echo $GNUPLOT
the other is creating the file the program is looking for in the directory where the program is (gnuplot.ini) and if this file has some variable that tells it where to read, yo might like to try that other method.
cd "\home/user/gnuplot
I did not know before, that gnuplot automatically executes this .gnuplot file
Feb 16, 2012 at 16:34