# script to present the susceptibility of a harmonic oscillator set terminal postscript eps color enhanced size 12cm,12cm font "Times-Roman,24pt" dashlength 2.0 set output "susceptibility.eps" set multiplot om0=1.0; chiabs(x,Q)=1/sqrt(((x**2)-(om0**2))**2+(om0**2)*(x**2)/(Q**2)) chiarg(x,Q)=atan2(om0*x/Q,om0**2-x**2) or2(Q)=om0*sqrt(1-0.5/(Q**2)) set xrange [0:2.3] set border 0 # amplitude plot set origin 0,.35 set size 1,.65 set yrange [0:6] set format y "%3g" set format x "" set tics nomirror set arrow 1 from 0,0 to 0,6 filled set arrow 2 from 0,0 to 2.4,0 filled set label 1 "{/Symbol | c(w) |}" at .1,6 set label 2 "{/Symbol w}" at 2.2, -.5 set xtics (0, "{/Symbol w}_R\n(Q=1)" or2(1), "{/Symbol w}_0" 1 ) set ytics (0, "{/Symbol c}_0" 1, "5{/Symbol c}_0" 5 ) set arrow 3 from or2(1),0 to or2(1),1.1 nohead lt 2 lc rgb 'red' set arrow 4 from or2(2),0 to or2(2),2 nohead lt 2 lc rgb 'magenta' set arrow 5 from or2(3),0 to or2(3),3 nohead lt 2 lc rgb 'blue' set arrow 6 from or2(5),0 to or2(5),5 nohead lt 2 lc rgb '#00c000' set label 7 " Q = 1" at 1.6,1.0 set arrow 7 from 1.6,1. to 1.4,0.6 set label 8 " Q = 2" at 1.35,1.9 set arrow 8 from 1.35,1.9 to 1.15,1.5 set label 9 " Q = 3" at 1.3,2.9 set arrow 9 from 1.3,2.9 to 1.1,2.5 set label 10 " Q = 5" at 1.28,4.1 set arrow 10 from 1.28,4.1 to 1.08,3.7 set label 11 " Q {/Symbol \256\245}" at 1.15,5.5 plot chiabs(x,1) w l lt 1 lc rgb 'red' notitle, \ chiabs(x,2) w l lt 1 lc rgb 'magenta' notitle, \ chiabs(x,3) w l lt 1 lc rgb 'blue' notitle, \ chiabs(x,5) w l lt 1 lc rgb '#00bf00' notitle, \ chiabs(x,1000000) w l lt 1 lc rgb '#bf00bf' notitle # phase plot set yrange [0:3.8] set origin 0,0 set size 1,.35 set format y "%3g" set format x "%g" set arrow 1 from 0,0 to 0,3.8 filled set arrow 2 from 0,0 to 2.4,0 filled set label 1 "- arg[{/Symbol c(w)}]" at .1,3.6 set label 2 "{/Symbol w} " at 2.2, -.5 unset arrow 3; unset arrow 4; unset arrow 5; unset arrow 6 unset arrow 7; unset arrow 8; unset arrow 9; unset arrow 10; unset label 7; unset label 8; unset label 9; unset label 10; set label 7 " Q = 1" at 1.6,1.5 set arrow 7 from 1.6,1.5 to 1.4,2.15 set label 11 " Q {/Symbol \256\245}" at 1.1,3.5 set ytics ( 0, "{/Symbol p}/2" pi/2, "{/Symbol p}" pi ) set xtics (0, "{/Symbol w}_0" 1 ) plot chiarg(x,1) w l lt 1 lc rgb 'red' notitle, \ chiarg(x,2) w l lt 1 lc rgb 'magenta' notitle, \ chiarg(x,3) w l lt 1 lc rgb 'blue' notitle, \ chiarg(x,5) w l lt 1 lc rgb '#00bf00' notitle, \ chiarg(x,1000000) w l lt 1 lc rgb '#bf00bf' notitle