向 xrange 和 yrange 添加额外的空格

Iag*_*lho 3 plot gnuplot

我想使用 Gnuplot 脚本绘制多个文件。
然而,我在使其完美方面遇到了一些麻烦。


我的实际情节是这样的: 我的实际情节

但是,线点图同时接触 x 轴和 y 轴。
因此,我想在xrangeand上添加额外的空间yrange并得到 我想要的情节 它不会触及我的轴。


我可以使用set xrange和手动进行操作set yrange
然而,我需要绘制 100 多个不同的文件,这样做会非常耗时。

有某种方式可以自动增加某些单位的xrange大小吗?yrange

我的 Gnuplot 代码如下。

#!/usr/bin/env gnuplot

set terminal epslatex size 7.5,3 standalone
set output 'pareto.tex'

set style fill solid 0.8
set ytics nomirror
set xtics nomirror

set grid lc rgb "#F2F2F2"

set xlabel 'Z_1'
set ylabel 'Z_2'

set xrange [170:215]
set yrange [7:40]

set style line 1 lt rgb "#000000" lw 12 pt 7 pointsize 3

plot "../exact.dat" using 1:2 title '$aug\,\epsilon$-CM' with linespoints ls 1

unset output

set output # finish the current output file
system('pdflatex --interaction=batchmode pareto.tex')
unset terminal

system

Run Code Online (Sandbox Code Playgroud)

Eth*_*han 5

您正在寻找的命令是set offset. 请参阅文档以获取完整说明。例子:

set multiplot layout 3,1

# Default placement
plot 'silver.dat' with lines

# Additional whitespace combined with auto-extenstion to nearest ticmark
set offset 20,20,20,20
replot

# Additional whitespace with no auto-extension to nearest ticmark
set xrange [*:*] noextend; set yrange [*:*] noextend
replot

unset multiplot
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述