星期四, 十月 07, 2010

用gnuplot來畫圖

開會要準備投影片時,如果要畫圖,我心裡就一陣幹。
這兩天,決定用gnuplot來做,果然,順手多了。雖然一開始為了生出一個可以用的script,也磨了一陣子。

plot "./data.txt" using 1:2 title "single direction", "./data.txt" using 1:3 title "two direction"
set title "throughput"
set xlabel "packet size(Bytes)"
set ylabel "rate(Mbps)"
set style data lines
set grid
replot
set output "throughput.png" ; set term png ; replot