似乎您想绘制条形图。
数据文件示例:
"my_time nehalem" 100
"cblas_tyme nehalem" 120
"optimized_time nehalem" 100
"my_time opteron" 200
"cblas_tyme opteron" 222
"optimized_time opteron" 202
"my_time quad" 103
"cblas_tyme quad" 100
"optimized_time quad" 99
您可以使用以下方法绘制此图:
plot "data.dat" using 2:xtic(1) with histogram
有关更多直方图示例,请参阅此处,了解更多信息。
编辑:
针对您的评论,您可能希望使用类似于以下的数据文件(例如 data.dat):
N simple-quad simple-nehalem simple-opteron alt-quad alt-nehalem alt-opteron
10000 2 3 3 2 7 7
15000 5 4 4 7 14 14
20000 10 12 12 15 17 20
您可以使用以下脚本进行绘制:
set autoscale y
set autoscale x
set grid
set xtic auto
set ytic auto
set xlabel "N"
set ylabel "Time"
plot "data.dat" every ::1 using 1:2 title "simple-quad" with linespoints, \
"data.dat" every ::1 using 1:3 title "simple-nehalem" with linespoints \
"data.dat" every ::1 using 1:4 title "simple-opteron" with linespoints \
"data.dat" every ::1 using 1:5 title "alt-quad" with linespoints \
"data.dat" every ::1 using 1:6 title "alt-nehalem" with linespoints \
"data.dat" every ::1 using 1:7 title "alt-opteron" with linespoints