是否有 gnuplot 配置文件? [英] Is there a gnuplot configuration file?

查看:25
本文介绍了是否有 gnuplot 配置文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置 gnuplot,以便在启动时我总是使用逗号作为数据文件分隔符,使用以下命令:

I am trying to setup gnuplot so that at startup I always have the comma as datafile separator, with the following command:

set datafile separator ","

不幸的是,gnuplot 中似乎没有 .gnuplotrc 的概念.至少我在手册页中没有找到任何内容,而且我在这台机器上没有 strace 所以我自己看不到.每次启动 gnuplot 时,我都厌倦了输入命令.有没有人对此有好的解决方案?请注意,使用 load 并不能解决我的问题:我仍然需要输入 load 命令.

Unfortunately, it looks like there's no concept of a .gnuplotrc in gnuplot. At least I didn't find anything in the man page, and I don't have strace on this machine so I cannot see by myself. I am tired of typing the command every time I fire up gnuplot. Does anybody have a good solution for this? Note that using load does not solve my issue: I would still have to type the load command.

推荐答案

事实上,有一个 gnuplot 启动文件:它叫做 .gnuplot,它应该完全符合你的要求.有关详细信息,请尝试在交互式 gnuplot 会话中运行 help startup.

In fact, there is a gnuplot startup file: it's called .gnuplot, and should do exactly what you want. For details, try running help startup within an interactive gnuplot session.

gnuplot 运行时,它会寻找要加载的初始化文件.该文件在 Unix 和 AmigaOS 系统上称为 .gnuplot,在其他系统上称为 GNUPLOT.INI.如果在当前目录中没有找到这个文件,程序会在HOME目录(AmigaOS、Atari(single)TOS、MS-DOS、Windows和OS/2下,环境变量GNUPLOT 应包含此目录的名称;在 Windows NT 上,如果未定义 GNUPLOT,它将使用 USERPROFILE).注意:如果在安装过程中定义了 NOCWDRC,gnuplot 将不会从当前目录读取.

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.

如果找到初始化文件,gnuplot 就会执行其中的命令.这些可能是任何合法的 gnuplot 命令,但通常仅限于设置终端和定义常用函数或变量.

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.

http://www.gnuplot.info/docs_4.2/gnuplot.html#x1-6900018

这篇关于是否有 gnuplot 配置文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆