使用gnuplot从多个文件进行绘图 [英] Plotting with gnuplot from several files

查看:736
本文介绍了使用gnuplot从多个文件进行绘图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个名为data_x.dat的文件,其中x的范围从110.我正在gnuplot中寻找可以让我直接在同一图中绘制第二列的所有文件,而不是

I have several files called data_x.dat, where x ranges from 1 to 10. I'm looking for something in gnuplot that would allow me to directly plot the second column agains the first one of all of the files in the same graph, instead of doing

p "data_1.dat" u 1:2, "data_2.dat" u 1:2, ..., "data_10.dat" u 1:2

,键入速度慢.像这样:

which is slow to type. Something like:

p "data_*" u 1:2

是我要寻找的. gnuplot是否存在?.

is what I'm looking for. Does it exist for gnuplot?.

谢谢.

推荐答案

使用内联迭代:

plot for [i=1:10] sprintf("data_%d.dat", i) u 1:2

这篇关于使用gnuplot从多个文件进行绘图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆