なんとなくやってみたくなって調べていたら、良さそうな方法が見つかったので・・・
こんなをgnuplotを使って作ります


まずはデータの準備。
そちらはいろんなところに良い記事がありますので、そちらを参考にどうぞ(なんて不親切な記事なんだ・・・)
データさえ生成できれば、あとは以下のようなスクリプトで1枚目の20枚のリザージュ曲線をまとめたようなグラフがパパっと描けます
for*1
do
f1=10; f2=10;
gene_data ${f1} ${f2} ${phase} > ${f1}_${f2}_${phase}.txt
f1=10; f2=20;
gene_data ${f1} ${f2} ${phase} > ${f1}_${f2}_${phase}.txt
f1=10; f2=30;
gene_data ${f1} ${f2} ${phase} > ${f1}_${f2}_${phase}.txt
f1=20; f2=30;
gene_data ${f1} ${f2} ${phase} > ${f1}_${f2}_${phase}.txt
#echo ${phase}
done
TERMINAL="set terminal png"
#XLABEL="set xlabel\"x\""
#YLABEL="set ylabel\"y\""
OUTPUT=reserge.png
OPTION="w l lw 2 notitle"
gnuplot <<EOF
set terminal png size 1080, 720 fontscale 1.0
${XLABEL}
${YLABEL}
set size square
set output "${OUTPUT}"
set multiplot layout 4, 5
plot "10_10_0.txt" ${OPTION}
plot "10_10_45.txt" ${OPTION}
plot "10_10_90.txt" ${OPTION}
plot "10_10_135.txt" ${OPTION}
plot "10_10_180.txt" ${OPTION}
plot "10_20_0.txt" ${OPTION}
plot "10_20_45.txt" ${OPTION}
plot "10_20_90.txt" ${OPTION}
plot "10_20_135.txt" ${OPTION}
plot "10_20_180.txt" ${OPTION}
plot "10_30_0.txt" ${OPTION}
plot "10_30_45.txt" ${OPTION}
plot "10_30_90.txt" ${OPTION}
plot "10_30_135.txt" ${OPTION}
plot "10_30_180.txt" ${OPTION}
plot "20_30_0.txt" ${OPTION}
plot "20_30_45.txt" ${OPTION}
plot "20_30_90.txt" ${OPTION}
plot "20_30_135.txt" ${OPTION}
plot "20_30_180.txt" ${OPTION}
unset multiplot
EOF
rm ./*.txt
次はgifアニメの作り方
以前にも記事は書きましたが、今回新たに別の方法を知りました・・・
今回見つけた方法
要するに、グラフを書くためのデータに例えば100行毎に改行があれば
それを index 1 のようにしてその部分だけをグラフ化することができると・・・
(using の親戚らしい)
で、データをそのように作ってあげると・・・
#set terminal gif animate
set output "hoge.gif"
nkmax=10
nk=0
while (nk < nkmax) {
plot [-1:1][-1:1] "${OUTPUT}" index nk w p pt 5 ps 1
nk=nk+1
}
(完全に自分用のメモだなこれは・・・)
ランキング参加中です
↓クリックしていただけると嬉しいです〜
*1:phase=0; phase<=180; phase+=45