我正在使用 gnuplot 尝试绘制多条线,但每条线都有不同的 x 范围。我正在运行以下脚本:
# gnuplot script for 'omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat'
plot "omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat" using 1:2 with lines title '1'
replot "omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat" using 1:3 with lines title '2'
replot "omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat" using 1:4 with lines title '3'
replot "omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat" using 1:5 with lines title '4'
replot "omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat" using 1:6 with lines title '5'
replot "omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat" using 1:7 with lines title '6'
replot "omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat" using 1:8 with lines title '7'
set terminal png size 800,600
set output "omar_vs_everyone-EVONLY.png"
replot
.dat 文件只是一个包含以下列的文件:
1 0.5 0.5 0.1
2 0.6 1.3 0.8
3 0.7 0.32
4 0.7 0.35
5 1.3 4.32
6 1.67
请注意,列具有不同的长度,因为每行具有不同的 x 范围。
我遇到的问题是它的情节很有趣,如下所示: alt text http://img192.imageshack.us/img192/4686/gnuplotfail.png