gnuplot输出曲线图

1.准备数据文件
timedata.txt文件内容如下:
2019-09-10    100
2019-09-11    900
2019-09-12    1300
2019-09-13    300
2019-09-14    1000

2.启动gnuplot,输入如下命令
set xdata time                   ##X轴代表时间
set timefmt "%Y-%m-%d" ##数据文件中的时间格式
set format x "%m/%d"      ##X轴显示的时间格式
set title "test"                   ##标题
plot 'D:gnuplot_data imedata.txt' using 1:2 with linespoints

输入如下:

gnuplot支持的时间格式

原文地址:https://www.cnblogs.com/hxlasky/p/11608272.html