gnuplot中通过两点画虚线或者画直线通常用的是arrow nohead。
若想要从坐标0,0至坐标1,1画一条直线,则可以使用如下命令:
set arrow nohead from 0,0 to 1,1
想要画虚线则可以在后面加上dt(dashtype) 1。
set arrow nohead from 0,0 to 1,1 dt 1
在画arrow时,若重复命令可能会使arrow叠加在一起,所以在重新画arrow之前需要使用命令:
unset arrow
以上为使用gnuplot的一点小总结,希望对各位有帮助!