24小时热门版块排行榜    

查看: 610  |  回复: 1

lily_fj

新虫 (初入文坛)

[求助] gnuplot批处理画图问题已有1人参与

有一百个命名有规律的文件,需要用gnuplot进行画图改怎么进行批处理。

发自小木虫IOS客户端
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

FMStation

至尊木虫 (知名作家)

【答案】应助回帖

感谢参与,应助指数 +1
https://stackoverflow.com/questions/14047061/running-gnuplot-script-from-cmd

First: create the script.sh like this:
CODE:
!/bin/sh

gnuplot << EOF
set terminal postscript eps color enhanced
set output "$1.eps" # all the declarations that you need
set xlabel "Energy [MeV]"
plot "$1.dat" using 1:2 notitle w l
EOF

Second: execute the script:
CODE:
$ ./script.sh data
*the parameter data es the .dat file that you will use for to graph...

2楼2016-10-15 07:24:26
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 lily_fj 的主题更新
信息提示
请填处理意见