自定义GnuPlot网格线

时间:2012-07-11 17:07:10

标签: gnuplot

这一切都在主题中。

如何在Gnuplot(v4.6)图表中自定义特定网格线?

任何提示都表示赞赏。

1 个答案:

答案 0 :(得分:14)

您想自定义网格中每一行的外观吗?如果是这样,您可以使用创建和使用线条样式的所有常规机制:

set style line 100 lt 1 lc rgb "red" lw 2
set grid ls 100
plot sin(x)

但是,如果要自定义单行,则无法执行此操作。我能想到的最好的事情是将另一条线(无头箭头)放在最上面:

set grid
set style line 100 lt 1 lc rgb "red" lw 2
set arrow 100 from 0,-1 to 0,1 nohead ls 100 front
plot sin(x)

请注意,您也可以将箭头定位在不同的坐标系中:

set arrow 100 from graph 0.5,0 to graph 0.5,1 nohead ls 100 front