有的时候我们需要在linux上使用shell根据数据文件绘制图像。可以使用下面的设置: 保存成png格式 set terminal png 指定保存的路径 set output “/tmp/output.png” 设置图形的名称 set title “My first graph” 设置x,y轴的名称 set xlabel “Angle, \n in degrees” set ylabel “sin(angle)” 指定x轴是时间 set xdata time 设置时间格式 set timefmt “%d/%m/%y” 指定绘制数据之间的样式 with linespoints using 1:2 告诉 plot 命令使用第一列作为 x 轴,第二列作为 y 轴