GNUPLOT输入文件7列,带小数



我正在尝试绘制以下数据文件:

61.0       16.4       100.0      28.6       28.6       12.2       12.2
59.0       25.4       100.0      21.4       21.4       11.8       11.8
69.0       15.9       100.0      35.7       35.7       11.5       11.5
59.0       23.7       100.0      23.4       23.4       11.8       11.8
49.0       20.4       100.0      18.0       18.0       9.8        9.8
84.0       13.1       90.9       50.8       50.8       16.8       16.8
59.0       16.9       100.0      22.6       22.6       11.8       11.8
71.0       16.9       100.0      32.8       32.8       14.2       14.2
68.0       19.1       100.0      26.2       26.2       13.6       13.6
91.0       13.2       100.0      51.6       51.6       18.2       18.2
57.0       22.8       100.0      29.4       29.4       11.4       11.4
52.0       26.9       100.0      17.8       17.8       10.4       10.4
55.0       21.8       100.0      32.2       32.2       11.0       11.0
68.0       19.1       100.0      29.8       29.8       13.6       13.6
50.0       22.0       100.0      19.0       19.0       10.0       10.0
149.0      12.1       66.7       111.2      111.2      29.8       29.8
69.0       20.3       100.0      29.8       29.8       13.8       13.8

我对gnuplot非常陌生,我似乎无法弄清楚获得此图的正确代码是什么:

我正在尝试这样的事情:

gnuplot> set output 'datastore1.png'                                                              
gnuplot> plot 'desktop1.dat' using 0:1 title "totalio" with lines, 'desktop1.dat' using 0:2 title "readpercentage" with lines, 'desktop1.dat' using 0:3 title "cachehitpercentage" with lines, 'desktop1.dat' using 0:4 title "currentkbpersecond" with lines, 'desktop1.dat' using 0:5 title "maximumkbpersecond" with lines, 'desktop1.dat' using 0:6 title "currentiopersecond" with lines, 'desktop1.dat' using 0:7 title "maximumiopersecond" with lines
gnuplot> quit

但是该图并不完全正确。

感谢您的帮助!

不确定您要在此处绘制什么,但是我认为错误是您使用的零列用于"不存在"的'lusther'命令。宁愿使用此

p 'desktop1.dat' u 1:2, 'desktop1.dat' u 1:3

编辑

因此,当您绘制时间时,您可能需要将另一列添加到您从文件中读取的数据中添加,以使您拥有

15       61.0       16.4       100.0      28.6       28.6       12.2       12.2

作为数据的第一行的示例。之后,您使用给定的绘图命令我在上面。

最新更新