use*_*209 1 gnuplot axis-labels
gnuplot 网格出现在与 xtics/ytics 相同的位置。
如何去掉某些(不是全部)抽动的抽动标签?
就我而言,我希望在 x 和 y 方向上每隔 0.25 就有一个网格线(即 0|0.25|0.5|...)。我只想要 x 方向上每隔 0.5 个间隔的 tic 标签,即 0|0.5|1|1.5...
有几种可能性。
1) 单独的 tic 标签可以用空字符串替换:
set xtics 0.25
set xtics add ("" 0.25, "" 0.75, "" 1.25, "" 1.75)
Run Code Online (Sandbox Code Playgroud)
2) 对主要和次要抽动网格线使用相同的线型。对附加网格线使用较小的抽动:
set grid lt 2, lt 2 # same linetype for major and minor grid lines
set grid xtics mxtics # draw grid for both major and minor tics on x
set xtics 0.5 # major tics every 0.5
set mxtics 2 # minor tics at double frequency of major tics
Run Code Online (Sandbox Code Playgroud)
3)使用正常的xtics作为绘图,但使用x2轴作为网格
set grid x2tics noxtics # grid lines for x2 but not x
set link x2 # x2 axis uses same range as x axis
set xtics 0.5 # define tics along x axis
set x2tics 0.25 format "" # different tics along x2, no labels
Run Code Online (Sandbox Code Playgroud)