gnuplot 中是否存在与 xrange 限制相关的变量?

Are there variables associated with xrange limits in gnuplot?

在 gnuplot 脚本中,我希望 x2range 是 xrange 的函数,即使 xrange 是由 gnuplot 自动设置的。如果有与 xrange 的两个限制关联的预定义变量,这可以很容易地完成。我搜索了这样的变量,但没有找到。

你检查过help link了吗?

来自 gnuplot 文档:

... The set link command establishes a mapping between the x and x2 axes, or the y and y2 axes. maps primary axis coordinates onto the secondary axis. maps secondary axis coordinates onto the primary axis. ...

同时输入 show var GPVAL_X

你将得到:

Variables beginning with GPVAL_X:
GPVAL_X_MIN = 0.0
GPVAL_X_MAX = 200.0
GPVAL_X_LOG = 10.0
GPVAL_X2_MIN = 0.0
GPVAL_X2_MAX = 199.0
GPVAL_X2_LOG = 10.0

但是这些值(当然)仅在 绘制后 设置并且是 "read only"。但是您可以绘制图形,读取这些值并相应地调整范围并重新绘制。