#!/bin/bash

cat > /tmp/plots.gnu <<EOF

set ylabel "Y"
set xlabel "X"
set xrange [-2:2]
set yrange [-2:2]
set grid xtics ytics
set size ratio 0.71
set terminal pdf size 26.7cm, 19cm
set output "tyout2.pdf"
plot "tyout2.txt" using 1:2 title "ty: 2" with lines
set output "tyout3.pdf"
plot "tyout3.txt" using 1:2 title "ty: 3" with lines
set output "tyout4.pdf"
plot "tyout4.txt" using 1:2 title "ty: 4" with lines
set output "tyout5.pdf"
plot "tyout5.txt" using 1:2 title "ty: 5" with lines
EOF

gnuplot44 /tmp/plots.gnu

