gnuplot-使用多个文件中的数据制作直方图 [英] gnuplot - Make a histogram with data located in multiple files

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

问题描述

我知道如何制作gnuplot中的直方图,但是我所看到的所有说明都是当数据位于单个文件中时有效.我的问题是我的数据跨越几个文件.有没有办法用gnuplot做到这一点?

I know how to make a histogram in gnuplot, but all the instructions I've seen are valid when the data is located in a single file. My problem is that my data spans several files. Is there any way to do this with gnuplot?

推荐答案

不是. Gnuplot实际上只擅长一次处理一个文件.但是,有许多有用的外部工具可以将文件组合在一起:

Not really. Gnuplot is really only good at dealing with one file at a time. However, there are many useful external tools which could combine the files together for you:

plot "<magic_external_tool file1 file2 file3 file4 ..."  ...

当然,您对外部工具的选择是关于文件已经如何格式化的问题.如果备用数据库(awksedjoincat ...)不起作用,我通常会依靠python编写一个快速脚本来完成这项工作,但是我敢肯定许多其他人会使用perljava之类的东西.使用什么工具都没关系,只要您可以哄它将格式正确的文件写入标准输出,就可以了.

of course your choice of external tool is a question of how your files are formatted already. If the standbys (awk, sed, join, cat ...) don't work, I often rely on python to write a quick script to do the job, but I'm sure many other people would use something like perl or java. It really doesn't matter what tool you use, as long as you can coax it to write a properly formatted file to standard output, you're golden.

这篇关于gnuplot-使用多个文件中的数据制作直方图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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