Gnuplot 对“中的多个using语句使用相同的颜色”;为「;环

Gnuplot 对“中的多个using语句使用相同的颜色”;为「;环,gnuplot,Gnuplot,我的gnuplot脚本中有以下循环,用于迭代多个文件并绘制一个图形: files = system("echo $(ls *.csv)") plot for [f in files] f using 0:2:xtic(1) with lp ,\ for [f in files] f using 0:2:2 with labels font ',8' offset 1,0.5 notitle "",\ for [f in files] f using 0:2:3 with yerrorbars

我的gnuplot脚本中有以下循环,用于迭代多个文件并绘制一个图形:

files = system("echo $(ls *.csv)")
plot for [f in files] f  using 0:2:xtic(1) with lp ,\
for [f in files] f using 0:2:2 with labels font ',8' offset 1,0.5 notitle "",\
for [f in files] f  using 0:2:3 with yerrorbars title ""
对于每个数据点,都会绘制一个线点、一个标签和一个yerrorbar

是否可以将相同的颜色用于对应的线点、Y线棒和标签? 如果是,如何进行


谢谢

您可以使用
设置线型循环…
来定义重复多少次后相同的图案和颜色:

files = system("echo $(ls *.csv)")

set linetype cycle words(files)

plot for [f in files] f  using 0:2:xtic(1) with lp ,\
     for [f in files] f using 0:2:2 with labels font ',8' offset 1,0.5 notitle "",\
     for [f in files] f  using 0:2:3 with yerrorbars title ""
下面是一个简单的例子:

set linetype cycle 2
set samples 10
set key left
set style function linespoints
plot x, 2*x, 3*x, 4*x, 5*x, 6*x
4.6.5的输出为: