# script to generate the beat pattern om0=20; Delta=1; x1(t)=cos(om0*t)*cos(Delta*t) x2(t)=sin(om0*t)*sin(Delta*t) set terminal postscript eps color enhanced size 12cm,8cm \ font "Times-Italic,24pt" dashlength 2.0 set output 'beats.eps' set multiplot set border 0 set xrange [0:2*pi] unset xtics unset ytics #top plot: x1 set origin .05,0.5 set size .95,0.5 set arrow 1 from 0,0 to 2*pi+.3,0 filled set arrow 2 from 0,-1.1 to 0,1.3 filled set label 1 at 2*pi+.3,-.1 "t" set label 2 at -.6,1 "x_1(t)" set xtics ("{/Symbol p}/2{/Symbol D}" pi/2, "3{/Symbol p}/2{/Symbol D}" 3*pi/2) axis plot x1(x) w l lw 2 notitle, \ cos(Delta*x) w l lt 2 lw 1 lc rgbcolor 'red' notitle, \ -cos(Delta*x) w l lt 2 lw 1 lc rgbcolor 'red' notitle # bottom plot: x2 set origin 0.05,0 set size .95,0.5 set xtics ("{/Symbol p}/{/Symbol D}" pi, "2{/Symbol p}/{/Symbol D}" 2*pi) axis set label 2 at -.6,1 "x_2(t)" plot x2(x) w l lw 2 notitle, \ sin(Delta*x) w l lt 2 lw 1 lc rgbcolor 'red' notitle, \ -sin(Delta*x) w l lt 2 lw 1 lc rgbcolor 'red' notitle