有 gnuplot 配置文件吗?

发布于 2024-07-29 00:31:23 字数 380 浏览 2 评论 0原文

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

set datafile separator ","

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

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 ","

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

旧时浪漫 2024-08-05 00:31:23

事实上,有一个 gnuplot 启动文件:它称为 .gnuplot,并且应该完全按照您的要求执行。 有关详细信息,请尝试在交互式 gnuplot 会话中运行 helpstart

18 启动

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

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

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

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.

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.

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

清引 2024-08-05 00:31:23

对于新版本的 gnuplot,请尝试以下操作:

使用 gnuplot 中的命令查看 gnuplotrc 文件的路径:

show loadpath

然后打开该文件并添加所需的命令。

Here is more info from the the [documentation][1] of the latest version(**4.6**):

当 gnuplot 运行时,它首先查找名为 gnuplotrc 的系统范围初始化文件。 该文件的位置在程序构建时确定,并由 show loadpath 报告。 然后,程序在用户的 HOME 目录中查找名为 .gnuplot(在类 Unix 系统上)或 GNUPLOT.INI(在其他系统上)的文件。 (Windows 和 OS/2 将在环境变量 GNUPLOT 中指定的目录中查找它;如果未定义 GNUPLOT,Windows 将使用 USERPROFILE)。 注意:可以将程序配置为首先在当前目录中查找,但不建议这样做,因为这是一种不好的安全做法。

For the new version of gnuplot try this:

See the path of the gnuplotrc file using the command within gnuplot:

show loadpath

Then just open the file and add the commands you want.

Here is more info from the the [documentation][1] of the latest version(**4.6**):

When gnuplot is run, it first looks for a system-wide initialization file named gnuplotrc. The location of this file is determined when the program is built and is reported by show loadpath. The program then looks in the user’s HOME directory for a file called .gnuplot on Unix-like systems or GNUPLOT.INI on other systems. (Windows and OS/2 will look for it in the directory named in the environment variable GNUPLOT; Windows will use USERPROFILE if GNUPLOT is not defined). Note: The program can be configured to look first in the current directory, but this is not recommended because it is bad security practice.

心是晴朗的。 2024-08-05 00:31:23

一般在Windows上,主配置文件GNUPLOT.INI是通过gnuplotrc中的命令加载的。 这样你就可以改变GNUPLOT.INI的位置,

但是除了GNUPLOT.INI之外,还有一个单独的widows终端配置文件。 它称为 wgnuplot.ini,可以在 %APPDATA% 目录中找到。 如果不存在,您可以手动创建。

当您选择终端控制台右键菜单底部的“更新..”时,该文件会自动更新。 这样,您可以更改该终端的字体大小等。

Generally on windows, the main configuration file GNUPLOT.INI is loaded by a command in gnuplotrc. This way you can change the location of GNUPLOT.INI

But in addition to GNUPLOT.INI, there is also a separate configuration file for the widows terminal. It is called wgnuplot.ini and it can be found in the %APPDATA% directory. You can create it manually if it does not exist.

This file is updated automatically when you select "update .." at the bottom of the right-click menu of the terminal console. This way, you can change e.g. the font size of that terminal.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文