0
我有下面的脚本在gnuplot中运行正常(不幸的是我有一个旧版本,现在我不能做太多的事情,它是4.0)。在gnuplot中添加网格
set xlabel "y"
set ylabel "rw[j]"
set title "P-D diagram"
set zeroaxis
set xzeroaxis
plot [0.5:1] \
-5.71429*x title "L[-5]" linetype 1, \
-4.28571*x title "U[-5]" linetype 3, \
-4.71429*x title "L[-4]" linetype 1, \
-3.28571*x title "U[-4]" linetype 3, \
-3.71429*x title "L[-3]" linetype 1, \
-2.28571*x title "U[-3]" linetype 3, \
-2.71429*x title "L[-2]" linetype 1, \
-1.28571*x title "U[-2]" linetype 3, \
-1.71429*x title "L[-1]" linetype 1, \
-0.285714*x title "U[-1]" linetype 3, \
-0.714286*x title "L[0]" linetype 1, \
0.714286*x title "U[0]" linetype 3, \
0.285714*x title "L[1]" linetype 1, \
1.71429*x title "U[1]" linetype 3, \
1.28571*x title "L[2]" linetype 1, \
2.71429*x title "U[2]" linetype 3, \
2.28571*x title "L[3]" linetype 1, \
3.71429*x title "U[3]" linetype 3, \
3.28571*x title "L[4]" linetype 1, \
4.71429*x title "U[4]" linetype 3, \
4.28571*x title "L[5]" linetype 1, \
5.71429*x title "U[5]" linetype 3
pause - 1
下面的照片(我知道...这是相当糟糕的,但不要紧,现在...)。
我想要做的就是添加一种网格,如果我使用grid
命令xticks
,yticks
设置等等,但是我得到一个网格,当我进行网格不缩放以及缩放(即它取决于窗口而不是全局坐标系)。
我想要做的是为每个dy = 0.5
设置行,例如类似于dx = 0.25
。这是因为间距以及整个脚本是使用小型C++程序派生的。无论如何要实现这一目标?
可能重复的[Gnuplot网格格式xtics mxtics](https://stackoverflow.com/questions/11492903/gnuplot-grid-format-xtics-mxtics) – opisthofulax