gnuplot与使用循环的多列 [英] gnuplot with muliple columns using loop
本文介绍了gnuplot与使用循环的多列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有许多文件(每个文件有10列),其顺序如下:
I have a number of files (having 10 columns each) with following order:
file_001.txt, file_002.txt, file_003_txt,
file_021.txt, file_023.txt, file_023.txt,
file_041.txt, file_042.txt, file_043.txt,
file_061.txt, file_062.txt, file_063.txt,
file_081.txt, file_082.txt, file_083.txt,
我想用不同的线画出每个文件.例如使用1:2,使用1:3,使用1:5,使用1:8.我无法循环调用不同的列.我的以下脚本不适用于k字段
I would like to plot each file with different line. e.g. using 1:2, using 1:3, using 1:5, using 1:8. I can not able to make a loop to call different columns. My following script is not working for k field
plot for [k=2, 3, 5, 8] for [j=0:8:2] for [i=1:3] 'file_0'.j.i.'.txt' u 1:k;
推荐答案
如果您有列表而不是范围,请使用for [k in "2 3 5 8"]
.
Use for [k in "2 3 5 8"]
if you have a list rather than a range.
这篇关于gnuplot与使用循环的多列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文