gnuplot绘制时间与两个数据集

时间:2017-06-21 11:09:28

标签: linux gnuplot

我必须使用gnuplot在文件中绘制三列。以下是inputv1.dat文件的示例输入文件和数据:

1498041447 2.0 0.0
1498041449 2.0 0.0
1498041451 2.0 0.0
1498041452 2.0 0.0
1498041453 2.0 0.0
1498041455 2.0 0.0
1498041456 2.0 0.0
1498041457 2.0 0.0
1498041458 2.0 0.0
1498041459 0.0 0.0
1498041460 0.0 0.0
1498041461 2.0 0.0
1498041461 0.0 0.0
1498041462 0.0 0.0
1498041463 2.0 0.0

以下是代码:

inputFile=inputv1.dat
/usr/bin/gnuplot << GPLOT
set terminal x11  enhanced title "CPU USAGE,MEMORY USAGE vs TIME" persist raise
set logscale xy
set xlabel "Time(10-sec interval)"
set ylabel "Run/Wait time"
plot  "$inputFile" smooth csplines using 3:1 ;
GPLOT

问题:

我需要在x轴上输入inputv1.dat的第1列(在纪元中的时间),而在y轴上需要第2列和第3列。

0 个答案:

没有答案