【发布时间】:2016-09-19 19:15:08
【问题描述】:
我想在单个图像中绘制不同的线条。每一行都保存在一个不同的纯文本文件中,它有: x |是 |深度。因此,我编写了这个名为 'plot_vg' 的文件:
set term pngcairo size 1000,8005
list = system('ls')
i = 1
set output 'image.png'
do for [file in list] {
if (file ne 'image.png') {
if (file ne 'plot_vg') {
if (file ne '..') {
if (i==1) {
i=0
plot sprintf('%s',file) using 1:2:3 with lines notitle
} else{
replot sprintf('%s',file) using 1:2:3 with lines notitle
}
}
}
}
}
我的问题是,最后,保存的图像只是最后一次重新绘制的图像,不包括其余的行。我已经看到它很好地进入了循环,它做了 1 个绘图,然后,其余的都是重新绘图。如果我从术语中打开 gnuplot 并编写前 1 个绘图然后重新绘图,则显示的图像就是我想要的。哪里出错了?
我从这里Gnuplot - Using replot with png terminal 尝试了第一个选项,但我得到一个空白图像文件。
【问题讨论】: