すべての行に5つのエントリがあるcsvファイルがあります。すべてのエントリは、ネットワークパケットがトリガーされるかどうかです。すべての行の最後のエントリは、パケットのサイズです。すべての行=経過時間(ミリ秒)。
例:行
1 , 0 , 1 , 2 , 117
たとえば、x軸が行番号で、yがすべての行の最初のエントリの値である場合のグラフをプロットするにはどうすればよいですか?
これで始められるはずです:
set datafile separator ","
plot 'infile' using 0:1
gnuplot(無料)を使用してpngファイルにプロットすることもできます。
ターミナルコマンド
gnuplot> set title '<title>'
gnuplot> set ylabel '<yLabel>'
gnuplot> set xlabel '<xLabel>'
gnuplot> set grid
gnuplot> set term png
gnuplot> set output '<Output file name>.png'
gnuplot> plot '<fromfile.csv>'
注:常に正しい拡張子(ここでは.png)を付ける必要がありますset output
次に、データが継続されていないため、出力が行ではない可能性もあります。これを修正するには、「plot」行を次のように変更するだけです。
plot '<Fromfile.csv>' with line lt -1 lw 2
その他の線編集オプション(ダッシュと線の色など):http: //gnuplot.sourceforge.net/demo_canvas/dashcolor.html
apt-get install gnuplot
)brew install gnuplot
)